Not using the functional options pattern (#11)
Official 100go entry on when functional options improve API ergonomics over sprawling constructors.
Official 100go entry on when functional options improve API ergonomics over sprawling constructors.
- Author: Teiva Harsanyi
- Authority: community
- Kind: guide
- URL: https://100go.co/#not-using-the-functional-options-pattern-11
What it covers
- functional option tradeoffs
- constructor ergonomics
- config API design
Why authoritative
Official 100go website entry for this specific mistake.
Use when
- should this constructor use functional options
- when are functional options idiomatic in Go
- is this config API too rigid
Keywords
- functional options, constructors, API design, configuration, options