Documentation
¶
Index ¶
- Variables
- func TypeName(goType string, fc *FlagTypeConfig) string
- type FlagStructField
- type FlagType
- func (ft *FlagType) GenerateFlagInterface() bool
- func (ft *FlagType) GenerateFmtStringerInterface() bool
- func (ft *FlagType) GenerateRequiredFlagInterface() bool
- func (ft *FlagType) GenerateVisibleFlagInterface() bool
- func (ft *FlagType) StructFields() []*FlagStructField
- func (ft *FlagType) TypeName() string
- func (ft *FlagType) ValuePointer() bool
- type FlagTypeConfig
- type Spec
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //go:embed generated.gotmpl TemplateString string //go:embed generated_test.gotmpl TestTemplateString string )
Functions ¶
func TypeName ¶
func TypeName(goType string, fc *FlagTypeConfig) string
Types ¶
type FlagStructField ¶
type FlagType ¶
type FlagType struct {
GoType string
Config *FlagTypeConfig
}
func (*FlagType) GenerateFlagInterface ¶
func (*FlagType) GenerateFmtStringerInterface ¶
func (*FlagType) GenerateRequiredFlagInterface ¶
func (*FlagType) GenerateVisibleFlagInterface ¶
func (*FlagType) StructFields ¶
func (ft *FlagType) StructFields() []*FlagStructField
func (*FlagType) ValuePointer ¶
type FlagTypeConfig ¶
type FlagTypeConfig struct {
SkipInterfaces []string `yaml:"skip_interfaces"`
StructFields []*FlagStructField `yaml:"struct_fields"`
TypeName string `yaml:"type_name"`
ValuePointer bool `yaml:"value_pointer"`
}
type Spec ¶
type Spec struct {
FlagTypes map[string]*FlagTypeConfig `yaml:"flag_types"`
PackageName string `yaml:"package_name"`
TestPackageName string `yaml:"test_package_name"`
UrfaveCLINamespace string `yaml:"urfave_cli_namespace"`
UrfaveCLITestNamespace string `yaml:"urfave_cli_test_namespace"`
}
func (*Spec) SortedFlagTypes ¶
Click to show internal directories.
Click to hide internal directories.