Lightlines
By cxuu

go-functional-options

cxuu1.2k installs

Keep Go constructors simple as options grow.

What it does

Guides the design of extensible Go constructors with optional settings and interface-based functional options.

When to use it

Use when designing Go constructors or public APIs with three or more optional arguments, growing configuration needs, or defaults callers should not have to supply.

How to use it

It changes how the agent designs Go constructors, keeping configuration internal, exposing option constructors, and applying options after defaults.

What you provide

  • An existing project

Latest review

What you need · 1

The reference specifies any supported Go version as the minimum.


Access · 0

No additional actions listed.