Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// IncludeRx is a list of regular expressions to match type names that should be
// processed. Anonymous structs can be matched by '<anonymous>' alias.
//
// Each regular expression must match the full type name, including package path.
// For example, to match type `net/http.Cookie` regular expression should be
// `.*/http\.Cookie`, but not `http\.Cookie`.
IncludeRx []string `exhaustruct:"optional"`
// ExcludeRx is a list of regular expressions to match type names that should be
// excluded from processing. Anonymous structs can be matched by '<anonymous>'
// alias.
//
// Has precedence over IncludeRx.
//
// Each regular expression must match the full type name, including package path.
// For example, to match type `net/http.Cookie` regular expression should be
// `.*/http\.Cookie`, but not `http\.Cookie`.
ExcludeRx []string `exhaustruct:"optional"`
// AllowEmpty allows empty structures, effectively excluding them from the check.
AllowEmpty bool `exhaustruct:"optional"`
// AllowEmptyRx is a list of regular expressions to match type names that should
// be allowed to be empty. Anonymous structs can be matched by '<anonymous>'
// alias.
//
// Each regular expression must match the full type name, including package path.
// For example, to match type `net/http.Cookie` regular expression should be
// `.*/http\.Cookie`, but not `http\.Cookie`.
AllowEmptyRx []string `exhaustruct:"optional"`
// AllowEmptyReturns allows empty structures in return statements.
AllowEmptyReturns bool `exhaustruct:"optional"`
// AllowEmptyDeclarations allows empty structures in variable declarations.
AllowEmptyDeclarations bool `exhaustruct:"optional"`
// contains filtered or unexported fields
}
func (*Config) BindToFlagSet ¶
BindToFlagSet binds the config fields to the provided flag set.
Click to show internal directories.
Click to hide internal directories.