Add "struct_references" configuration (#155)
Adds a "struct_references" configuration that will: * Use a pointer type for struct fields that are a complex type * The behaviour can be overridden by setting "pointer: false" in the proceeding comment blocks * Sets the "omitempty: true" flag on fields matching the criteria. This can also be overriden by setting "omitempty: false" Although we'd debated not setting the pointer for array elements, it did turn out to be simpler to set them everywhere and also made the documentation cleaner to have a single rule to explain. Fixes #149.
This commit is contained in:
@@ -27,6 +27,7 @@ type Config struct {
|
||||
ContextType string `yaml:"context_type"`
|
||||
ClientGetter string `yaml:"client_getter"`
|
||||
Bindings map[string]*TypeBinding `yaml:"bindings"`
|
||||
StructReferences bool `yaml:"use_struct_references"`
|
||||
|
||||
// Set to true to use features that aren't fully ready to use.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user