Go best practices, common gotchas, and performance optimization. Includes WebAssembly development.
Project & Package
- Standard Go project layout → See standard-go-project-layout
- Go modules and dependency management → See go-mod-dependency-management
- Go naming conventions → See go-naming-conventions
Error Handling
- Go-style error handling patterns → See error-handling-patterns
- Sentinel errors and error wrapping → See error-sentinel-wrapping
- Recover and panic best practices → See error-recover-panic
Types & Memory
- Value types vs pointers → See value-type-vs-pointer
- Understanding nil in Go → See go-nil-handling
- Memory management and GC → See memory-management-gc
- Escape analysis → See escape-analysis
Concurrency
- Goroutine lifecycle management → See goroutine-lifecycle
- Channel patterns → See channel-patterns
- Sync primitives (Mutex, RWMutex, Atomic) → See sync-primitives
- Common concurrency pitfalls → See concurrency-pitfalls
Interfaces
- Interface design principles → See interface-design
- Dependency injection → See dependency-injection
- Interface and nil → See interface-nil
Performance
- String and []byte optimization → See string-byte-optimization
- Slice tips and tricks → See slice-optimization
- Map optimization → See map-optimization
- Profiling with pprof → See pprof-usage
Testing
- Table-driven tests → See table-driven-tests
- Mocking techniques → See go-mocking
- Benchmarking → See benchmarking
Tooling
- Linting and formatting → See linting-formatting
- Documentation with godoc → See godoc-best-practices
- Build tags and conditional compilation → See build-tags
WebAssembly
- WASM basics and compilation → See wasm-basics
- JS interop with wasm_exec → See wasm-js-interop
- DOM manipulation → See wasm-dom-manipulation
- Memory management in WASM → See wasm-memory-management
- Callbacks and async → See wasm-callbacks-async
- WASM performance considerations → See wasm-performance
- Debugging WASM → See wasm-debugging
- Practical WASM use cases → See wasm-use-cases
Common Gotchas
- Loop variable closure → See loop-variable-closure
- Slice append behavior → See slice-append-behavior
- time.After memory leak → See time-after-leak
- HTTP client timeouts → See http-client-timeouts