command
module
Version:
v0.0.9
Opens a new window with list of versions in this module.
Published: May 10, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 16
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
optgen
Functional Option Generator for go
Usage
Add to tools.go
package tools
import (
_ "github.com/ecordell/optgen"
)
Anywhere in your codebase, call optgen via go:generate
//go:generate go run github.com/ecordell/optgen . MyConfig
package mypkg
Features
- Detects scope and will only generate options for private members if generating in the same package
- Detects slice and map types and creates functions to append or replace
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.