Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Stdout io.Writer = os.Stdout
Stdout standard output
Functions ¶
func GenerateAndLoadDotEnv ¶
GenerateAndLoadDotEnv to create and load envfile
func GenerateUsage ¶
GenerateUsage generate usage document
Types ¶
type Envconfig ¶
type Envconfig struct { Ctor string Prefix string SpecType string Name string Fields []*Field FnName string }
Envconfig model
type EnvconfigAnnotation ¶
type EnvconfigAnnotation struct { TagName string // By default is `@envconfig` Template string // By default defined in defaultCfgTemplate variable Target string // By default is `cmd/PROJECT_NAME/envconfig_annotated.go` DotEnv string // Dotenv path. It will be generated if not empty UsageDoc string // Usage documentation path. It will be if not emtpy }
EnvconfigAnnotation handle @envconfig annotation e.g. `@envconfig (prefix: "PREFIX" ctor:"CTOR")`
Click to show internal directories.
Click to hide internal directories.