Documentation
¶
Overview ¶
Package generate holds helper function for the code generation that we use.
Index ¶
- Variables
- func Ast(file string) (f *ast.File, t *token.FileSet, err error)
- func Fields(file string) (map[string][]string, error)
- func FilterTypeSpecs(typeSpecs []*ast.TypeSpec, names []string) []*ast.TypeSpec
- func IsEmbedded(strct *ast.StructType) bool
- func StructTypeSpecs(file string) ([]*ast.TypeSpec, error)
- func Types(file string) ([]string, error)
- func Write(b *bytes.Buffer, out string)
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyData = []string{
"ANY", "AVC", "AXFR", "CDNSKEY", "CDS", "CLA", "DELEGI", "DLV", "HTTPS",
"IXFR", "KEY", "NXNAME", "NXT", "OPT", "SIG", "SPF", "RESINFO", "WALLET",
}
EmptyData are RR that don't have rdata (or are embedding another type) and as such do not have an entry in rdata/rdata.go
View Source
var FlagDebug = flag.Bool("debug", false, "Emit the non-formatted code to standard output and do not write it to a file.")
Functions ¶
func Fields ¶
Fields returns the export type names and the field's names. Each name is prefixed with "rr.".
func FilterTypeSpecs ¶ added in v0.5.37
FilterTypeSpecs filters the type specs on name.
func IsEmbedded ¶ added in v0.5.3
func IsEmbedded(strct *ast.StructType) bool
func StructTypeSpecs ¶
StructTypeSpecs returns the struct types from file that can be inspected for the struct tags.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.