Documentation ¶
Overview ¶
Package pkg defines the interface for loading Go packages.
It provides a pluggable means for systems like Bazel and Buck to inject an alternative package loading mechanism instead of go/packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoPackagesLoaderFactory ¶
type GoPackagesLoaderFactory struct {
// contains filtered or unexported fields
}
GoPackagesLoaderFactory builds a Loader that uses the go/packages to load package information.
func (*GoPackagesLoaderFactory) RegisterFlags ¶
func (f *GoPackagesLoaderFactory) RegisterFlags(fset *flag.Set) Loader
RegisterFlags registers no new flags for GoPackagesLoaderFactory.
type LoaderFactory ¶
type LoaderFactory interface { // RegisterFlags builds a Loader and registers the flags // necessary for it with the given flag set. // // The returned Loader will not be used until the parser // has finished parsing its arguments. RegisterFlags(*flag.Set) Loader }
LoaderFactory builds Loaders from command line flags.
type Package ¶
type Package struct { // CompiledGoFiles is a list of absolute file paths of Go files. CompiledGoFiles []string // Syntax is a ASTs of files in CompiledGoFiles in the same order. Syntax []*ast.File // Types is type information about CompiledGoFiles. Types *types.Package // TypesInfo provides type information about ASTs. TypesInfo *types.Info }
Package is a Go package that cff is going to generate code for.
Click to show internal directories.
Click to hide internal directories.