Documentation ¶
Overview ¶
Package cl compiles Go+ syntax trees (ast).
Index ¶
- Variables
- func FindGoModFile(dir string) (file string, err error)
- func GenGoPkgs(cfg *packages.Config, notFounds []string) (err error)
- func GetModulePath(file string) (pkgPath string, err error)
- func LoadGop(cfg *packages.Config, patterns ...string) ([]*packages.Package, error)
- func LoadGopPkgs(at *gox.Package, importPkgs map[string]*gox.PkgRef, pkgPaths ...string) int
- func NewPackage(pkgPath string, pkg *ast.Package, fset *token.FileSet, conf *Config) (p *gox.Package, err error)
- type Config
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func FindGoModFile ¶ added in v0.9.0
func GetModulePath ¶ added in v0.9.0
func LoadGopPkgs ¶ added in v0.9.0
LoadGopPkgs loads and returns the Go+ packages named by the given pkgPaths.
Types ¶
type Config ¶ added in v0.9.0
type Config struct { // Context specifies the context for the load operation. // If the context is cancelled, the loader may stop early // and return an ErrCancelled error. // If Context is nil, the load cannot be cancelled. Context context.Context // Logf is the logger for the config. // If the user provides a logger, debug logging is enabled. // If the GOPACKAGESDEBUG environment variable is set to true, // but the logger is nil, default to log.Printf. Logf func(format string, args ...interface{}) // Dir is the directory in which to run the build system's query tool // that provides information about the packages. // If Dir is empty, the tool is run in the current directory. Dir string // Env is the environment to use when invoking the build system's query tool. // If Env is nil, the current environment is used. // As in os/exec's Cmd, only the last value in the slice for // each environment key is used. To specify the setting of only // a few variables, append to the current environment, as in: // // opt.Env = append(os.Environ(), "GOOS=plan9", "GOARCH=386") // Env []string // BuildFlags is a list of command-line flags to be passed through to // the build system's query tool. BuildFlags []string // LoadPkgs is called to load all import packages. LoadPkgs gox.LoadPkgsFunc }
Config of loading Go+ packages.
Click to show internal directories.
Click to hide internal directories.