table-of-contents-eng
Table of Contents 1
Introduction 5
Language Mechanics 6
Syntax 6
Variable 6
Struct 8
Pointer 11
Escape analysis 12
Function 15
Constant 17
Data Structures 20
Array 20
Slice 25
Map 34
Decoupling 37
Method 37
Interface 46
Embedding 55
Exporting 60
Software Design 65
Composition 65
Grouping types 65
Decoupling 70
Conversion 89
Interface Pollution 94
Mocking 98
Error Handling 101
Default error values 101
Error variables 103
Type as context 105
Behavior as context 107
Finding the bug 110
Wrapping Errors 111
Concurrency 114
Mechanics 114
Goroutine 114
Language Mechanics 121
Data race 128
Channel 139
Patterns 164
Context 164
Testing and Profiling 173
Testing 173
Basic Unit Test 173
Benchmarking 191
Basic Benchmark 191
Sub Benchmark 192
Profiling 193
Stack Trace 193
GODEBUG 196
Keep in touch 199
Last updated
Was this helpful?