Documentation ¶
Index ¶
- func SplitIntoRuns(values []Value) [][]Value
- type File
- func (f *File) AppendValue(v Value)
- func (f *File) GenDecl(node ast.Node) bool
- func (f *File) GetFile() *ast.File
- func (f *File) GetTypeName() string
- func (f *File) GetValues() []Value
- func (f *File) SetFile(file *ast.File)
- func (f *File) SetTypeName(typeName string)
- func (f *File) SetValues(values []Value)
- type Generator
- func (g *Generator) Format() []byte
- func (g *Generator) Generate(typeName string)
- func (g *Generator) GetPackage() *Package
- func (g *Generator) ParsePackage(patterns []string, tags []string)
- func (g *Generator) Printf(format string, args ...interface{})
- func (g *Generator) SetLineComment(lineComment bool)
- func (g *Generator) SetTrimPrefix(prefix string)
- type Package
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitIntoRuns ¶
SplitIntoRuns breaks the values into runs of contiguous sequences. For example, given 1,2,3,5,6,7 it returns {1,2,3},{5,6,7}. The input slice is known to be non-empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File holds a single parsed file and associated data.
func (*File) AppendValue ¶
func (*File) GetTypeName ¶
func (*File) SetTypeName ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator holds the state of the analysis. Primarily used to buffer the output for format.Source.
func (*Generator) GetPackage ¶
func (*Generator) ParsePackage ¶
ParsePackage analyzes the single package constructed from the patterns and tags. ParsePackage exits if there is an error.
func (*Generator) SetLineComment ¶
func (*Generator) SetTrimPrefix ¶
Click to show internal directories.
Click to hide internal directories.