Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Logf func(s string, v ...interface{})
Functions ¶
This section is empty.
Types ¶
type FileSet ¶
type FileSet struct { Package string // package name Specs map[string]ast.Expr // type specs in file Identities map[string]gen.Elem // processed from specs Directives []string // raw preprocessor directives Imports []*ast.ImportSpec // imports CompactFloats bool // Use smaller floats when feasible ClearOmitted bool // Set omitted fields to zero value NewTime bool // Set to use -1 extension for time.Time AsUTC bool // Set timezone to UTC instead of local AllowMapShims bool // Allow map keys to be shimmed (default true) AllowBinMaps bool // Allow maps with binary keys to be used (default false) AutoMapShims bool // Automatically shim map keys of builtin types(default false) // contains filtered or unexported fields }
A FileSet is the in-memory representation of a parsed file.
func File ¶
File parses a file at the relative path provided and produces a new *FileSet. If you pass in a path to a directory, the entire directory will be parsed. If unexport is false, only exported identifiers are included in the FileSet. If the resulting FileSet would be empty, an error is returned.
Click to show internal directories.
Click to hide internal directories.