Versions in this module Expand all Collapse all v1 v1.0.0 Dec 16, 2023 Changes in this version + const JSONTagName + const TagName + var DefaultTestType = &TestType + func GenerateCodeFile(buffer *bytes.Buffer, info TypeInfo) error + func GenerateTestFile(buffer *bytes.Buffer, info TypeInfo) error + type ComplexJSONType struct + IntValue int + StringValue string + func (c *ComplexJSONType) UnmarshalJSON(b []byte) error + type FieldInfo struct + DefaultValue string + FlagMethodName string + GoName string + LocalTypeName string + Name string + ShouldBindDefault bool + ShouldTestDefault bool + TestFlagMethodName string + TestStrategy TestStrategy + TestValue string + Typ types.Type + UsageString string + type NamedType int + const NamedTypeA + const NamedTypeB + func NamedTypeString(s string) (NamedType, error) + func NamedTypeValues() []NamedType + func (i *NamedType) UnmarshalJSON(data []byte) error + func (i NamedType) IsANamedType() bool + func (i NamedType) MarshalJSON() ([]byte, error) + func (i NamedType) String() string + type NestedType struct + IntValue int + type PFlagProvider struct + func (p PFlagProvider) Imports() map[string]string + func (p PFlagProvider) WriteCodeFile(outputFilePath string) error + func (p PFlagProvider) WriteTestFile(outputFilePath string) error + type PFlagProviderGenerator struct + func NewGenerator(pkg, targetTypeName, defaultVariableName string, shouldBindDefaultVar bool) (*PFlagProviderGenerator, error) + func (g PFlagProviderGenerator) Generate(ctx context.Context) (PFlagProvider, error) + func (g PFlagProviderGenerator) GetTargetPackage() *types.Package + type PFlagValueType struct + Name string + ShouldGenerateSetAndType bool + type SliceOrArray interface + Elem func() types.Type + type Tag struct + DefaultValue string + Name string + Usage string + func ParseTag(tag string) (t Tag, err error) + type TestConstTypeAlias = int + type TestStrategy string + const JSON + const Raw + const SliceJoined + type TestType struct + AliasType TestConstTypeAlias + BoolValue bool + ComplexJSONArray []ComplexJSONType + ConstType NamedType + IgnoredMap map[string]string + IntArray []int + IntValue *int + NestedType NestedType + StorageConfig storage.Config + StringArray []string + StringMap map[string]string + StringToJSON ComplexJSONType + StringValue string + type TypeInfo struct + Fields []FieldInfo + Imports map[string]string + Name string + PFlagValueTypes []PFlagValueType + Package string + Timestamp time.Time + TypeRef string