Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Argument ¶
type Argument struct {
Name string `mapstructure:"name"`
Type string `mapstructure:"type"`
Required bool `mapstructure:"required"`
ShortHelp string `mapstructure:"short_help"`
LongHelp string `mapstructure:"long_help"`
}
Argument represents a single argument configuration.
type Flag ¶
type Flag struct {
Name string `mapstructure:"name"`
CLI string `mapstructure:"cli"`
Type string `mapstructure:"type"`
Delimiter string `mapstructure:"delimiter"`
Default interface{} `mapstructure:"default"`
ShortHelp string `mapstructure:"short_help"`
LongHelp string `mapstructure:"long_help"`
}
Flag represents a single flag configuration.
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator represents a flag, HTML, or Markdown generator.
func NewGenerator ¶
func NewGenerator(cfg *ParsedConfig) (*Generator, error)
NewGenerator creates a new generator with the given package name, name, and path to the TOML configuration file.
type GoConfig ¶
type GoConfig struct {
Package string `mapstructure:"package"`
ConfigTypeName string `mapstructure:"config_type_name"`
FlagSetUsage string `mapstructure:"flag_set_usage"`
FlagSetName string `mapstructure:"flag_set_name"`
FlagErrorHandling string `mapstructure:"flag_error_handling"`
}
GoConfig represents the configuration for the generated Go code.
type ParsedConfig ¶
Click to show internal directories.
Click to hide internal directories.