Documentation
¶
Overview ¶
Command typecfg-gen emits a GeneratedBinder implementation for a named config struct so Loader can bind/validate without reflecting over fields.
Usage:
typecfg-gen -type Config -in config.go -out config_gen.go -package mypkg
Typical go:generate directive in the file that defines the struct:
//go:generate go run github.com/sinashahoveisi/typecfg/cmd/typecfg-gen -type Config -in config.go -out config_gen.go -package mypkg
Click to show internal directories.
Click to hide internal directories.