Versions in this module Expand all Collapse all v1 v1.0.1 Oct 13, 2022 v1.0.0 Oct 13, 2022 Changes in this version + var WellKnownAbbreviations = map[string]bool + func SplitComponents(name string) []string + type AbbreviationHandlingFieldNamer struct + Abbreviations map[string]bool + func (a *AbbreviationHandlingFieldNamer) FieldName(property string) string + type FieldNamer interface + FieldName func(property string) string + type Generator struct + func NewGenerator(options ...GeneratorOption) *Generator + func (g *Generator) GoCode(observedValue *ObservedValue) ([]byte, error) + func (g *Generator) GoType(o *ObservedValue, observations int, imports map[string]bool) (string, bool) + type GeneratorOption func(*Generator) + func WithAddStructTagName(structTagName string) GeneratorOption + func WithFieldNamer(fieldNamer FieldNamer) GeneratorOption + func WithGoFormat(goFormat bool) GeneratorOption + func WithImports(imports ...string) GeneratorOption + func WithIntType(intType string) GeneratorOption + func WithOmitEmpty(omitEmptyOption OmitEmptyOption) GeneratorOption + func WithPackageComment(packageComment string) GeneratorOption + func WithPackageName(packageName string) GeneratorOption + func WithSkipUnparseableProperties(skipUnparseableProperties bool) GeneratorOption + func WithStructTagName(structTagName string) GeneratorOption + func WithStructTagNames(structTagNames []string) GeneratorOption + func WithTypeComment(typeComment string) GeneratorOption + func WithTypeName(typeName string) GeneratorOption + func WithUseInline(useInline bool) GeneratorOption + func WithUseJSONNumber(useJSONNumber bool) GeneratorOption + type ObservedValue struct + AllArrayElementValues *ObservedValue + AllObjectPropertyValues *ObservedValue + Array int + Bool int + Empty int + FieldKey string + Float64 int + Int int + Null int + Object int + ObjectPropertyValue map[string]*ObservedValue + Observations int + String int + Time int + func ObserveJSON(r io.Reader) (*ObservedValue, error) + func ObserveYAML(r io.Reader) (*ObservedValue, error) + func (o *ObservedValue) Merge(value interface{}) *ObservedValue + type OmitEmptyOption int + const OmitEmptyAlways + const OmitEmptyAuto + const OmitEmptyNever