Documentation ¶
Index ¶
- Variables
- func BuildDir(dir string, conf *Config, build *gocmd.BuildConfig, flags ...GenFlags) (err error)
- func BuildFiles(files []string, conf *Config, build *gocmd.BuildConfig) (err error)
- func BuildPkgPath(workDir, pkgPath string, conf *Config, build *gocmd.BuildConfig, ...) (err error)
- func ErrorPos(err error) token.Pos
- func FilterNoTestFiles(fi fs.FileInfo) bool
- func GenGo(dir string, conf *Config, genTestPkg bool) (string, bool, error)
- func GenGoEx(dir string, conf *Config, genTestPkg bool, flags GenFlags) (string, bool, error)
- func GenGoFiles(autogen string, files []string, conf *Config) (outFiles []string, err error)
- func GenGoPkgPath(workDir, pkgPath string, conf *Config, allowExtern bool) (localDir string, recursively bool, err error)
- func GenGoPkgPathEx(workDir, pkgPath string, conf *Config, allowExtern bool, flags GenFlags) (localDir string, recursively bool, err error)
- func GetFileClassType(mod *gopmod.Module, file *ast.File, filename string) (classType string, isTest bool, ok bool)
- func IgnoreNotated(err error) bool
- func InstallDir(dir string, conf *Config, install *gocmd.InstallConfig, flags ...GenFlags) (err error)
- func InstallFiles(files []string, conf *Config, install *gocmd.InstallConfig) (err error)
- func InstallPkgPath(workDir, pkgPath string, conf *Config, install *gocmd.InstallConfig, ...) (err error)
- func LoadDir(dir string, conf *Config, genTestPkg bool, promptGenGo ...bool) (out, test *gogen.Package, err error)
- func LoadFiles(dir string, files []string, conf *Config) (out *gogen.Package, err error)
- func LoadMod(dir string) (mod *gopmod.Module, err error)
- func NotFound(err error) bool
- func Outline(dir string, conf *Config) (out outline.Package, err error)
- func OutlinePkgPath(workDir, pkgPath string, conf *Config, allowExtern bool) (out outline.Package, err error)
- func RunDir(dir string, args []string, conf *Config, run *gocmd.RunConfig, ...) (err error)
- func RunFiles(autogen string, files []string, args []string, conf *Config, ...) (err error)
- func RunPkgPath(pkgPath string, args []string, chDir bool, conf *Config, run *gocmd.RunConfig, ...) (err error)
- func TestDir(dir string, conf *Config, test *gocmd.TestConfig, flags ...GenFlags) (err error)
- func TestFiles(files []string, conf *Config, test *gocmd.TestConfig) (err error)
- func TestPkgPath(workDir, pkgPath string, conf *Config, test *gocmd.TestConfig, ...) (err error)
- func Tidy(dir string, gop *env.Gop) (err error)
- type ConfFlags
- type Config
- type GenFlags
- type Importer
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = gopmod.ErrNotFound ErrIgnoreNotated = errors.New("notated error ignored") )
var ( ErrMultiPackges = errors.New("multiple packages") ErrMultiTestPackges = errors.New("multiple test packages") )
Functions ¶
func BuildFiles ¶ added in v1.1.0
func BuildFiles(files []string, conf *Config, build *gocmd.BuildConfig) (err error)
BuildFiles builds specified Go+ files.
func BuildPkgPath ¶ added in v1.1.0
func BuildPkgPath(workDir, pkgPath string, conf *Config, build *gocmd.BuildConfig, flags ...GenFlags) (err error)
BuildPkgPath builds a Go+ package.
func FilterNoTestFiles ¶ added in v1.2.2
FilterNoTestFiles filters to skip all testing files.
func GenGoFiles ¶ added in v1.1.0
GenGoFiles generates gop_autogen.go for specified Go+ files.
func GenGoPkgPath ¶ added in v1.1.0
func GenGoPkgPath(workDir, pkgPath string, conf *Config, allowExtern bool) (localDir string, recursively bool, err error)
GenGoPkgPath generates gop_autogen.go for a Go+ package.
func GenGoPkgPathEx ¶ added in v1.1.8
func GenGoPkgPathEx(workDir, pkgPath string, conf *Config, allowExtern bool, flags GenFlags) (localDir string, recursively bool, err error)
GenGoPkgPathEx generates gop_autogen.go for a Go+ package.
func GetFileClassType ¶ added in v1.2.6
func GetFileClassType(mod *gopmod.Module, file *ast.File, filename string) (classType string, isTest bool, ok bool)
GetFileClassType get gop module file classType.
func IgnoreNotated ¶ added in v1.1.10
IgnoreNotated returns if cause err is ErrIgnoreNotated or not.
func InstallDir ¶ added in v1.1.0
func InstallDir(dir string, conf *Config, install *gocmd.InstallConfig, flags ...GenFlags) (err error)
InstallDir installs a Go+ package directory.
func InstallFiles ¶ added in v1.1.0
func InstallFiles(files []string, conf *Config, install *gocmd.InstallConfig) (err error)
InstallFiles installs specified Go+ files.
func InstallPkgPath ¶ added in v1.1.0
func InstallPkgPath(workDir, pkgPath string, conf *Config, install *gocmd.InstallConfig, flags ...GenFlags) (err error)
InstallPkgPath installs a Go+ package.
func LoadDir ¶ added in v1.1.0
func LoadDir(dir string, conf *Config, genTestPkg bool, promptGenGo ...bool) (out, test *gogen.Package, err error)
LoadDir loads Go+ packages from a specified directory.
func OutlinePkgPath ¶ added in v1.1.8
func RunDir ¶ added in v1.1.0
func RunDir(dir string, args []string, conf *Config, run *gocmd.RunConfig, flags ...GenFlags) (err error)
RunDir runs an application from a Go+ package directory.
func RunFiles ¶ added in v1.1.0
func RunFiles(autogen string, files []string, args []string, conf *Config, run *gocmd.RunConfig) (err error)
RunFiles runs an application from specified Go+ files.
func RunPkgPath ¶ added in v1.1.0
func RunPkgPath(pkgPath string, args []string, chDir bool, conf *Config, run *gocmd.RunConfig, flags ...GenFlags) (err error)
RunPkgPath runs an application from a Go+ package.
func TestFiles ¶ added in v1.1.0
func TestFiles(files []string, conf *Config, test *gocmd.TestConfig) (err error)
TestFiles tests specified Go+ files.
func TestPkgPath ¶ added in v1.1.0
func TestPkgPath(workDir, pkgPath string, conf *Config, test *gocmd.TestConfig, flags ...GenFlags) (err error)
TestPkgPath tests a Go+ package.
Types ¶
type Config ¶ added in v1.1.0
type Config struct { Gop *env.Gop Fset *token.FileSet Mod *gopmod.Module Importer *Importer Filter func(fs.FileInfo) bool // If not nil, it is used for returning result of checks Go+ dependencies. // see https://pkg.go.dev/github.com/goplus/gogen#File.CheckGopDeps GopDeps *int // CacheFile specifies the file path of the cache. CacheFile string IgnoreNotatedError bool DontUpdateGoMod bool }
Config represents a configuration for loading Go+ packages.
func NewDefaultConf ¶ added in v1.2.1
NewDefaultConf creates a dfault configuration for common cases.
func (*Config) UpdateCache ¶ added in v1.2.6
UpdateCache updates the cache.
type Importer ¶ added in v1.1.0
type Importer struct { Flags GenFlags // can change this for loading Go+ modules // contains filtered or unexported fields }
Importer represents a Go+ importer.
func NewImporter ¶ added in v1.1.0
NewImporter creates a Go+ Importer.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package ast declares the types used to represent syntax trees for Go+ packages.
|
Package ast declares the types used to represent syntax trees for Go+ packages. |
Package cl compiles Go+ syntax trees (ast).
|
Package cl compiles Go+ syntax trees (ast). |
cmd
|
|
internal/base
Package base defines shared basic pieces of the gop command, in particular logging and the Command structure.
|
Package base defines shared basic pieces of the gop command, in particular logging and the Command structure. |
internal/build
Package build implements the “gop build” command.
|
Package build implements the “gop build” command. |
internal/gengo
Package gengo implements the “gop go” command.
|
Package gengo implements the “gop go” command. |
internal/gopfmt
Package gopfmt implements the “gop fmt” command.
|
Package gopfmt implements the “gop fmt” command. |
internal/help
Package help implements the “gop help” command.
|
Package help implements the “gop help” command. |
internal/install
Package install implements the “gop install” command.
|
Package install implements the “gop install” command. |
internal/mod
* Copyright (c) 2021 The GoPlus Authors (goplus.org).
|
* Copyright (c) 2021 The GoPlus Authors (goplus.org). |
internal/run
Package run implements the “gop run” command.
|
Package run implements the “gop run” command. |
internal/serve
Package serve implements the “gop serve command.
|
Package serve implements the “gop serve command. |
internal/test
Package test implements the “gop test” command.
|
Package test implements the “gop test” command. |
Package format implements standard formatting of Go+ source.
|
Package format implements standard formatting of Go+ source. |
Package parser implements a parser for Go+ source files.
|
Package parser implements a parser for Go+ source files. |
Package printer implements printing of AST nodes.
|
Package printer implements printing of AST nodes. |
Package scanner implements a scanner for Go+ source text.
|
Package scanner implements a scanner for Go+ source text. |
Package token defines constants representing the lexical tokens of the Go+ programming language and basic operations on tokens (printing, predicates).
|
Package token defines constants representing the lexical tokens of the Go+ programming language and basic operations on tokens (printing, predicates). |
x
|
|
jsonrpc2
Package jsonrpc2 is a minimal implementation of the JSON RPC 2 spec.
|
Package jsonrpc2 is a minimal implementation of the JSON RPC 2 spec. |
jsonrpc2/internal/stack
Package stack provides support for parsing standard goroutine stack traces.
|
Package stack provides support for parsing standard goroutine stack traces. |
watcher
Package watcher monitors code changes in a Go+ workspace.
|
Package watcher monitors code changes in a Go+ workspace. |