Build Systems With Go: Everything a Gopher must know
375
129
3MB
English
Year 2021
Report DMCA / Copyright
DOWNLOAD EPUB FILE
Table of contents :
Preface
Part I: The GO language
Chapter 1 First steps with Go
1.1 Save the world with Go!!!
1.2 Passing arguments to our program
1.3 Summary
Chapter 2 The basics
2.1 Packages and imports
2.2 Variables, constants, and enums
2.3 Functions
2.4 Pointers
2.5 nil and zero values
2.6 Loops and branches
2.7 Errors
2.8 Defer, panic, and recover
2.9 Init functions
2.10 Summary
Chapter 3 Arrays, slices, and maps
3.1 Arrays
3.2 Slices
3.3 Maps
3.4 Summary
Chapter 4 Structs, methods, and interfaces
4.1 Structs
4.2 Methods
4.3 Interfaces
4.4 Summary
Chapter 5 Reflection
5.1 reflect.Type
5.2 reflect.Value
5.3 Creating functions on the fly
5.4 Tags
5.5 The three laws of reflection
5.6 Summary
Chapter 6 Concurrency
6.1 Goroutines
6.2 Channels
6.3 Select
6.4 WaitGroup
6.5 Timers, tickers, and timeouts
6.6 Context
6.7 Once
6.8 Mutexes
6.9 Atomics
6.10 Summary
Chapter 7 Input/Output
7.1 Readers and writers
7.2 Reading and Writing files
7.3 Standard I/O
7.4 Summary
Chapter 8 Encodings
8.1 CSV
8.2 JSON
8.3 XML
8.4 YAML
8.5 Tags and encoding
8.6 Summary
Chapter 9 HTTP
9.1 Requests
9.2 HTTP Server
9.3 Cookies
9.4 Middleware
9.5 Summary
Chapter 10 Templates
10.1 Filling templates with structs
10.2 Actions
10.3 Functions
10.4 HTML
10.5 Summary
Chapter 11 Testing
11.1 Tests
11.2 Examples
11.3 Benchmarking
11.4 Coverage
11.5 Profiling
11.6 Summary
Chapter 12 Modules and documentation
12.1 Modules
12.2 Documentation
12.3 Summary
Part II: Building systems
Chapter 13 Protocol buffers
13.1 The proto file
13.2 Complex messages
13.3 Importing other proto definitions
13.4 Nested types
13.5 Type Any
13.6 Type Oneof
13.7 Maps
13.8 JSON
13.9 Summary
Chapter 14 gRPC
14.1 Definition of services
14.2 Creating a server
14.3 Creating clients
14.4 Streaming
14.5 Transcoding
14.6 Interceptors
14.7 Summary
Chapter 15 Logging with Zerolog
15.1 The log package
15.2 Zerolog basics
15.3 Zerolog settings
15.4 Zerolog advanced settings
15.5 Summary
Chapter 16 Command Line Interface
16.1 The basics
16.2 Arguments and Flags
16.3 Commands
16.4 Advanced features
16.5 Summary
Chapter 17 Relational databases
17.1 SQL in Go
17.2 GORM
17.3 Manipulate data
17.4 Summary
Chapter 18 NoSQL databases
18.1 Cassandra and GoCQL
18.2 Summary
Chapter 19 Kafka
19.1 The basics
19.2 Using the Confluent client
19.3 Using the Segmentio client
19.4 Using the Kafka REST API
19.5 Summary
Bibliography
Notes