gitextract_0hghv22e/ ├── .gitattributes ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── community_mistake.md │ │ └── erratum.md │ └── workflows/ │ └── ci.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── docs/ │ ├── 20-slice.md │ ├── 28-maps-memory-leaks.md │ ├── 5-interface-pollution.md │ ├── 56-concurrency-faster.md │ ├── 89-benchmarks.md │ ├── 9-generics.md │ ├── 92-false-sharing.md │ ├── 98-profiling-execution-tracing.md │ ├── CNAME │ ├── book.md │ ├── chapter-1.md │ ├── external.md │ ├── index.md │ ├── ja.md │ ├── pt-br.md │ ├── stylesheets/ │ │ └── extra.css │ └── zh.md ├── go.mod ├── go.sum ├── includes/ │ └── abbreviations.md ├── justfile ├── mkdocs.yml ├── overrides/ │ ├── main.html │ └── partials/ │ └── comments.html ├── site/ │ ├── 20-slice/ │ │ └── index.html │ ├── 28-maps-memory-leaks/ │ │ └── index.html │ ├── 404.html │ ├── 5-interface-pollution/ │ │ └── index.html │ ├── 56-concurrency-faster/ │ │ └── index.html │ ├── 89-benchmarks/ │ │ └── index.html │ ├── 9-generics/ │ │ └── index.html │ ├── 92-false-sharing/ │ │ └── index.html │ ├── 98-profiling-execution-tracing/ │ │ └── index.html │ ├── CNAME │ ├── assets/ │ │ └── javascripts/ │ │ └── lunr/ │ │ ├── tinyseg.js │ │ └── wordcut.js │ ├── book/ │ │ └── index.html │ ├── chapter-1/ │ │ └── index.html │ ├── external/ │ │ └── index.html │ ├── index.html │ ├── ja/ │ │ └── index.html │ ├── pt-br/ │ │ └── index.html │ ├── search/ │ │ └── search_index.json │ ├── sitemap.xml │ ├── stylesheets/ │ │ └── extra.css │ └── zh/ │ └── index.html └── src/ ├── 02-code-project-organization/ │ ├── 1-variable-shadowing/ │ │ └── main.go │ ├── 10-type-embedding/ │ │ └── main.go │ ├── 11-functional-options/ │ │ ├── builder/ │ │ │ └── main.go │ │ ├── config-struct/ │ │ │ └── main.go │ │ └── functional-options/ │ │ └── main.go │ ├── 13-utility-packages/ │ │ └── stringset.go │ ├── 2-nested-code/ │ │ └── main.go │ ├── 3-init-functions/ │ │ ├── db/ │ │ │ └── main.go │ │ ├── main/ │ │ │ └── main.go │ │ └── redis/ │ │ └── redis.go │ ├── 5-interface-pollution/ │ │ ├── copy/ │ │ │ ├── main.go │ │ │ └── main_test.go │ │ ├── decoupling/ │ │ │ ├── with.go │ │ │ └── without.go │ │ └── restricting-behavior/ │ │ └── main.go │ ├── 6-interface-producer/ │ │ ├── client/ │ │ │ └── client.go │ │ └── store/ │ │ └── store.go │ ├── 8-any/ │ │ ├── main.go │ │ └── store/ │ │ ├── after.go │ │ └── before.go │ └── 9-generics/ │ └── main.go ├── 03-data-types/ │ ├── 17-octal-literals/ │ │ └── main.go │ ├── 18-integer-overflows/ │ │ └── main.go │ ├── 19-floating-points/ │ │ └── main.go │ ├── 20-slice-length-cap/ │ │ └── main.go │ ├── 21-slice-init/ │ │ ├── main.go │ │ └── main_test.go │ ├── 22-nil-empty-slice/ │ │ ├── json/ │ │ │ └── main.go │ │ └── slice-init/ │ │ └── main.go │ ├── 23-checking-slice-empty/ │ │ └── main.go │ ├── 24-slice-copy/ │ │ └── main.go │ ├── 25-slice-append/ │ │ └── main.go │ ├── 26-slice-memory-leak/ │ │ ├── capacity-leak/ │ │ │ └── main.go │ │ └── slice-pointers/ │ │ └── main.go │ ├── 27-map-init/ │ │ └── main_test.go │ ├── 28-map-memory-leak/ │ │ └── main.go │ └── 29-comparing-values/ │ └── main.go ├── 04-control-structures/ │ ├── 30-range-loop-element-copied/ │ │ ├── concepts/ │ │ │ └── main.go │ │ └── value-copy/ │ │ └── main.go │ ├── 31-range-loop-arg-evaluation/ │ │ ├── arrays/ │ │ │ └── main.go │ │ ├── channels/ │ │ │ └── main.go │ │ └── concepts/ │ │ └── main.go │ ├── 32-range-loop-pointers/ │ │ ├── concepts/ │ │ │ └── main.go │ │ └── customer-store/ │ │ └── main.go │ ├── 33-map-iteration/ │ │ └── main.go │ ├── 34-break/ │ │ └── main.go │ └── 35-defer-loop/ │ └── main.go ├── 05-strings/ │ ├── 36-rune/ │ │ └── main.go │ ├── 37-string-iteration/ │ │ └── main.go │ ├── 38-trim/ │ │ └── main.go │ ├── 39-string-concat/ │ │ ├── main.go │ │ └── main_test.go │ ├── 40-string-conversion/ │ │ └── main.go │ └── 41-substring-memory-leak/ │ └── main.go ├── 06-functions-methods/ │ ├── 42-receiver/ │ │ ├── pointer/ │ │ │ └── main.go │ │ ├── struct-with-pointer/ │ │ │ └── main.go │ │ └── value/ │ │ └── main.go │ ├── 43-named-result-parameters/ │ │ └── main.go │ ├── 44-side-effects-named-result-parameters/ │ │ └── main.go │ ├── 45-nil-receiver/ │ │ └── main.go │ ├── 46-function-input/ │ │ ├── main.go │ │ └── main_test.go │ └── 47-defer-evaluation/ │ ├── args/ │ │ └── main.go │ └── receiver/ │ ├── pointer/ │ │ └── main.go │ └── value/ │ └── main.go ├── 07-error-management/ │ ├── 48-panic/ │ │ └── main.go │ ├── 49-error-wrapping/ │ │ └── main.go │ ├── 50-compare-error-type/ │ │ └── main.go │ ├── 51-comparing-error-value/ │ │ └── main.go │ ├── 52-handling-error-twice/ │ │ └── main.go │ ├── 53-not-handling-error/ │ │ └── main.go │ └── 54-defer-errors/ │ └── main.go ├── 08-concurrency-foundations/ │ ├── 56-faster/ │ │ ├── main.go │ │ └── main_test.go │ ├── 58-races/ │ │ ├── memory-model/ │ │ │ └── main.go │ │ └── races/ │ │ └── main.go │ ├── 59-workload-type/ │ │ └── main.go │ └── 60-contexts/ │ ├── flight/ │ │ └── flight.go │ └── main.go ├── 09-concurrency-practice/ │ ├── 61-inappropriate-context/ │ │ └── main.go │ ├── 62-starting-goroutine/ │ │ ├── listing1/ │ │ │ └── main.go │ │ ├── listing2/ │ │ │ └── main.go │ │ └── listing3/ │ │ └── main.go │ ├── 63-goroutines-loop-variables/ │ │ └── main.go │ ├── 64-select-behavior/ │ │ └── main.go │ ├── 66-nil-channels/ │ │ └── main.go │ ├── 68-string-formatting/ │ │ └── main.go │ ├── 69-data-race-append/ │ │ └── main.go │ ├── 70-mutex-slices-maps/ │ │ └── main.go │ ├── 71-wait-group/ │ │ └── main.go │ ├── 72-cond/ │ │ └── main.go │ ├── 73-errgroup/ │ │ └── main.go │ └── 74-copying-sync/ │ └── main.go ├── 10-standard-lib/ │ ├── 75-wrong-time-duration/ │ │ └── main.go │ ├── 76-time-after/ │ │ └── main.go │ ├── 77-json-handling/ │ │ ├── map-any/ │ │ │ └── main.go │ │ ├── monotonic-clock/ │ │ │ └── main.go │ │ └── type-embedding/ │ │ └── main.go │ ├── 78-sql/ │ │ ├── null-values/ │ │ │ └── main.go │ │ ├── prepared-statements/ │ │ │ └── main.go │ │ ├── rows-iterations-errors/ │ │ │ └── main.go │ │ └── sql-open/ │ │ └── main.go │ ├── 79-closing-resources/ │ │ ├── http/ │ │ │ └── main.go │ │ ├── os-file/ │ │ │ └── main.go │ │ └── sql-rows/ │ │ └── main.go │ ├── 80-http-return/ │ │ └── main.go │ └── 81-default-http-client-server/ │ ├── client/ │ │ └── main.go │ └── server/ │ └── main.go ├── 11-testing/ │ ├── 82-categorizing-tests/ │ │ ├── build-tags/ │ │ │ └── db_test.go │ │ └── short-mode/ │ │ └── main_test.go │ ├── 85-table-driven-tests/ │ │ ├── main.go │ │ └── main_test.go │ ├── 86-sleeping/ │ │ ├── main.go │ │ └── main_test.go │ ├── 87-time-api/ │ │ ├── listing1/ │ │ │ ├── main.go │ │ │ └── main_test.go │ │ ├── listing2/ │ │ │ ├── main.go │ │ │ └── main_test.go │ │ ├── listing3/ │ │ │ ├── main.go │ │ │ └── main_test.go │ │ └── listing4/ │ │ ├── main.go │ │ └── main_test.go │ ├── 88-utility-package/ │ │ ├── httptest/ │ │ │ ├── main.go │ │ │ └── main_test.go │ │ └── iotest/ │ │ ├── main.go │ │ └── main_test.go │ ├── 89-benchmark/ │ │ ├── compiler-optimizations/ │ │ │ ├── main.go │ │ │ └── main_test.go │ │ ├── observer-effect/ │ │ │ ├── main.go │ │ │ └── main_test.go │ │ ├── timer/ │ │ │ └── main_test.go │ │ └── wrong-assumptions/ │ │ └── main_test.go │ └── 90-testing-features/ │ ├── different-package/ │ │ ├── main.go │ │ └── main_test.go │ ├── setup-teardown/ │ │ └── main_test.go │ └── utility-function/ │ ├── main.go │ └── main_test.go └── 12-optimizations/ ├── 91-cpu-caches/ │ ├── cache-line/ │ │ ├── main.go │ │ └── main_test.go │ ├── predictability/ │ │ ├── main.go │ │ └── main_test.go │ └── slice-structs/ │ ├── main.go │ └── main_test.go ├── 92-false-sharing/ │ ├── main.go │ └── main_test.go ├── 93-instruction-level-parallelism/ │ ├── main.go │ └── main_test.go ├── 94-data-alignment/ │ ├── main.go │ └── main_test.go ├── 95-stack-heap/ │ ├── main.go │ └── main_test.go └── 96-reduce-allocations/ ├── compiler/ │ └── main.go └── sync-pool/ └── main.go