genx: Index | Files

package genx

import ""


Package Files

genx.go pkg.go rewriters.go utils.go

type GenX Uses

type GenX struct {
    BuildTags      []string
    CommentFilters []func(string) string
    // contains filtered or unexported fields

func New Uses

func New(pkgName string, rewriters map[string]string) *GenX

func (*GenX) OrderedRewriters Uses

func (g *GenX) OrderedRewriters() (out []string)

func (*GenX) Parse Uses

func (g *GenX) Parse(fname string, src interface{}) (ParsedFile, error)

Parse parses the input file or src and returns a ParsedFile and/or an error. For more details about fname/src check `go/parser.ParseFile`

func (*GenX) ParsePkg Uses

func (g *GenX) ParsePkg(path string, includeTests bool) (out ParsedPkg, err error)

ParsePKG will parse the provided package, on success it will then process the files with x/tools/imports (goimports) then return the resulting package.

type ParsedFile Uses

type ParsedFile struct {
    Name string
    Src  []byte

func (ParsedFile) WriteFile Uses

func (f ParsedFile) WriteFile(path string) error

type ParsedPkg Uses

type ParsedPkg []ParsedFile

func (ParsedPkg) MergeAll Uses

func (p ParsedPkg) MergeAll(tests bool) (ParsedFile, error)

func (ParsedPkg) WriteAllMerged Uses

func (p ParsedPkg) WriteAllMerged(fname string, tests bool) error

func (ParsedPkg) WritePkg Uses

func (p ParsedPkg) WritePkg(dir string) error

Package genx imports 17 packages (graph). Updated 2017-10-09. Refresh now. Tools for package owners.