Effective Go
Idiomatic guidance on Go style, control flow, interfaces, methods, and core library usage.
Idiomatic guidance on Go style, control flow, interfaces, methods, and core library usage.
- Author: Go Team
- Authority: primary
- Kind: guide
- URL: https://go.dev/doc/effective_go
What it covers
- idiomatic API and type design
- error and control-flow style
- methods interfaces and general style
Why authoritative
Go Team guidance on idiomatic code structure and style.
Use when
- what is the idiomatic Go style here
- is this Effective Go compliant
- how should this Go code be structured idiomatically
Keywords
- idiomatic Go, style, interfaces, methods, effective go
Used by
- buffered-channels
- channels
- defer
- dependency-injection
- embedding
- init-functions
- interface-design
- io-readers
- maps
- named-result-parameters
- receiver-choice
- slices
- strings
- zero-values
- package-and-import-semantics
- communicating-sequential-processes
- go-concurrency-philosophy
- gofmt-and-formatting
- new-vs-make
- fmt-printing
- getters
- interface-names