售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Title Page
Copyright
Go Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
I/O and File Systems
Introduction
Using the common I/O interfaces
Getting ready
How to do it...
How it works...
Using the bytes and strings packages
Getting ready
How to do it...
How it works...
Working with directories and files
Getting ready
How to do it...
How it works...
Working with the CSV format
Getting ready
How to do it...
How it works...
Working with temporary files
Getting ready
How to do it...
How it works...
Working with text/template and HTML/templates
Getting ready
How to do it...
How it works...
Command-Line Tools
Introduction
Using command-line flags
Getting ready
How to do it...
How it works...
Using command-line arguments
Getting ready
How to do it...
How it works...
Reading and setting environment variables
Getting ready
How to do it...
How it works...
Configuration using TOML, YAML, and JSON
Getting ready
How to do it...
How it works...
Working with Unix pipes
Getting ready
How to do it...
How it works...
Catching and handling signals
Getting ready
How to do it...
How it works...
An ANSI coloring application
Getting ready
How to do it...
How it works...
Data Conversion and Composition
Introduction
Converting data types and interface casting
Getting ready
How to do it...
How it works...
Working with numeric data types using math and math/big
Getting ready
How to do it...
How it works...
Currency conversions and float64 considerations
Getting ready
How to do it...
How it works...
Using pointers and SQL NullTypes for encoding and decoding
Getting ready
How to do it...
How it works...
Encoding and decoding Go data
Getting ready
How to do it...
How it works...
Struct tags and basic reflection in Go
Getting ready
How to do it...
How it works...
Implementing collections via closures
Getting ready
How to do it...
How it works...
Error Handling in Go
Introduction
Handling errors and the Error interface
Getting ready
How to do it...
How it works...
Using the pkg/errors package and wrapping errors
Getting ready
How to do it...
How it works...
Using the log package and understanding when to log errors
Getting ready
How to do it...
How it works...
Structured logging with the apex and logrus packages
Getting ready
How to do it...
How it works...
Logging with the context package
Getting ready
How to do it...
How it works...
Using package-level global variables
Getting ready
How to do it...
How it works...
Catching panics for long running processes
Getting ready
How to do it...
How it works...
All about Databases and Storage
Introduction
The database/sql package with MySQL
Getting ready
How to do it...
How it works...
Executing a database transaction interface
Getting ready
How to do it...
How it works...
Connection pooling, rate limiting, and timeouts for SQL
Getting ready
How to do it...
How it works...
Working with Redis
Getting ready
How to do it...
How it works...
Using NoSQL with MongoDB and mgo
Getting ready
How to do it...
How it works...
Creating storage interfaces for data portability
Getting ready
How to do it...
How it works...
Web Clients and APIs
Introduction
Initializing, storing, and passing http.Client structs
Getting ready
How to do it...
How it works...
Writing a client for a REST API
Getting ready
How to do it...
How it works...
Executing parallel and async client requests
Getting ready
How to do it...
How it works...
Making use of OAuth2 clients
Getting ready
How to do it...
How it works...
Implementing an OAuth2 token storage interface
Getting ready
How to do it...
How it works...
Wrapping a client in added functionality and function composition
Getting ready
How to do it...
How it works...
Understanding GRPC clients
Getting ready
How to do it...
How it works...
Microservices for Applications in Go
Introduction
Working with web handlers, requests, and ResponseWriters
Getting ready
How to do it...
How it works...
Using structs and closures for stateful handlers
Getting ready
How to do it...
How it works...
Validating input for Go structs and user inputs
Getting ready
How to do it...
How it works...
Rendering and content negotiation
Getting ready
How to do it...
How it works...
Implementing and using middleware
Getting ready
How to do it...
How it works...
Building a reverse proxy application
Getting ready
How to do it...
How it works...
Exporting GRPC as a JSON API
Getting ready
How to do it...
How it works...
Testing
Introduction
Mocking using the standard library
Getting ready
How to do it...
How it works...
Using the Mockgen package
Getting ready
How to do it...
How it works...
Using table-driven tests to improve coverage
Getting ready
How to do it...
How it works...
Using third-party testing tools
Getting ready
How to do it...
How it works...
Practical fuzzing
Getting ready
How to do it...
How it works...
Behavior testing using Go
Getting ready
How to do it...
How it works...
Parallelism and Concurrency
Introduction
Using channels and the select statement
Getting ready
How to do it...
How it works...
Performing async operations with sync.WaitGroup
Getting ready
How to do it...
How it works...
Using atomic operations and mutex
Getting ready
How to do it...
How it works...
Using the context package
Getting ready
How to do it...
How it works...
Executing state management for channels
Getting ready
How to do it...
How it works...
Using the worker pool design pattern
Getting ready
How to do it...
How it works...
Using workers to create pipelines
Getting ready
How to do it...
How it works...
Distributed Systems
Introduction
Using service discovery with Consul
Getting ready
How to do it...
How it works...
Implementing basic consensus using Raft
Getting ready
How to do it...
How it works...
Using containerization with Docker
Getting ready
How to do it...
How it works...
Orchestration and deployment strategies
Getting ready
How to do it...
How it works...
Monitoring applications
Getting ready
How to do it...
How it works...
Collecting metrics
Getting ready
How to do it...
How it works...
Reactive Programming and Data Streams
Introduction
Goflow for dataflow programming
Getting ready
How to do it...
How it works...
Reactive programming with RxGo
Getting ready
How to do it...
How it works...
Using Kafka with Sarama
Getting ready
How to do it...
How it works...
Using async producers with Kafka
Getting ready
How to do it...
How it works...
Connecting Kafka to Goflow
Getting ready
How to do it...
How it works...
Writing a GraphQL server in Go
Getting ready
How to do it...
How it works...
Serverless Programming
Introduction
Go programming on Lambda with Apex
Getting ready
How to do it...
How it works...
Apex serverless logging and metrics
Getting ready
How to do it...
How it works...
Google App Engine with Go
Getting ready
How to do it...
How it works...
Working with Firebase using zabawaba99/firego
Getting ready
How to do it...
How it works...
Performance Improvements, Tips, and Tricks
Introduction
Speeding up compilation and testing cycles
Getting ready
How to do it...
How it works...
Using the pprof tool
Getting ready
How to do it...
How it works...
Benchmarking and finding bottlenecks
Getting ready
How to do it...
How it works...
Memory allocation and heap management
Getting ready
How to do it...
How it works...
Vendoring and project layout
Getting ready
How to do it...
How it works...
Using fasthttprouter and fasthttp
Getting ready
How to do it...
How it works...
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜