gop

package module
v1.2.0-test.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 26 Imported by: 242

README

Build Status Go Report Card Coverage Status GitHub release Discord

The Go+ programming language is designed for engineering, STEM education, and data science.

  • For engineering: working in the simplest language that can be mastered by children.
  • For STEM education: studying an engineering language that can be used for work in the future.
  • For data science: communicating with engineers in the same language.

For more details, see Quick Start.

Key Features of Go+

How to install

from source code

For now, we suggest you install Go+ from source code.

Note: Requires go1.18 or later

git clone https://github.com/goplus/gop.git
cd gop

# On mac/linux run:
./all.bash
# On Windows run:
all.bat

on macOS/Linux

Install via brew

$ brew install goplus

Go+ Applications

2D Games powered by Go+

DevOps tools

Data processing

IDE Plugins

Contributing

The Go+ project welcomes all contributors. We appreciate your help!

For more details, see Contributing & compiler design.

Give a Star! ⭐

If you like or are using Go+ to learn or start your projects, please give it a star. Thanks!

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound      = syscall.ENOENT
	ErrIgnoreNotated = errors.New("notated error ignored")
)
View Source
var (
	ErrMultiPackges     = errors.New("multiple packages")
	ErrMultiTestPackges = errors.New("multiple test packages")
)

Functions

func BuildDir added in v1.1.0

func BuildDir(dir string, conf *Config, build *gocmd.BuildConfig) (err error)

func BuildFiles added in v1.1.0

func BuildFiles(files []string, conf *Config, build *gocmd.BuildConfig) (err error)

func BuildPkgPath added in v1.1.0

func BuildPkgPath(workDir, pkgPath string, conf *Config, build *gocmd.BuildConfig) (err error)

func ErrorPos added in v1.1.10

func ErrorPos(err error) token.Pos

ErrorPos returns where the error occurs.

func GenGo added in v1.1.0

func GenGo(dir string, conf *Config, genTestPkg bool) (string, bool, error)

func GenGoEx added in v1.1.8

func GenGoEx(dir string, conf *Config, genTestPkg bool, flags GenFlags) (string, bool, error)

func GenGoFiles added in v1.1.0

func GenGoFiles(autogen string, files []string, conf *Config) (result []string, err error)

func GenGoPkgPath added in v1.1.0

func GenGoPkgPath(workDir, pkgPath string, conf *Config, allowExtern bool) (localDir string, recursively bool, err error)

func GenGoPkgPathEx added in v1.1.8

func GenGoPkgPathEx(workDir, pkgPath string, conf *Config, allowExtern bool, flags GenFlags) (localDir string, recursively bool, err error)

func IgnoreNotated added in v1.1.10

func IgnoreNotated(err error) bool

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) (err error)

func InstallFiles added in v1.1.0

func InstallFiles(files []string, conf *Config, install *gocmd.InstallConfig) (err error)

func InstallPkgPath added in v1.1.0

func InstallPkgPath(workDir, pkgPath string, conf *Config, install *gocmd.InstallConfig) (err error)

func LoadDir added in v1.1.0

func LoadDir(dir string, conf *Config, genTestPkg bool, promptGenGo ...bool) (out, test *gox.Package, err error)

func LoadFiles added in v1.1.0

func LoadFiles(dir string, files []string, conf *Config) (out *gox.Package, err error)

func LoadMod added in v1.1.5

func LoadMod(dir string) (mod *gopmod.Module, err error)

func NotFound added in v1.1.2

func NotFound(err error) bool

NotFound returns if cause err is ErrNotFound or not

func Outline added in v1.1.8

func Outline(dir string, conf *Config) (out outline.Package, err error)

func OutlinePkgPath added in v1.1.8

func OutlinePkgPath(workDir, pkgPath string, conf *Config, allowExtern bool) (out outline.Package, err error)

func RunDir added in v1.1.0

func RunDir(dir string, args []string, conf *Config, run *gocmd.RunConfig) (err error)

func RunFiles added in v1.1.0

func RunFiles(autogen string, files []string, args []string, conf *Config, run *gocmd.RunConfig) (err error)

func RunPkgPath added in v1.1.0

func RunPkgPath(pkgPath string, args []string, chDir bool, conf *Config, run *gocmd.RunConfig) (err error)

func TestDir added in v1.1.0

func TestDir(dir string, conf *Config, test *gocmd.TestConfig) (err error)

func TestFiles added in v1.1.0

func TestFiles(files []string, conf *Config, test *gocmd.TestConfig) (err error)

func TestPkgPath added in v1.1.0

func TestPkgPath(workDir, pkgPath string, conf *Config, test *gocmd.TestConfig) (err error)

func Tidy added in v1.1.0

func Tidy(dir string, gop *env.Gop) (err error)

Types

type Config added in v1.1.0

type Config struct {
	Gop      *env.Gop
	Fset     *token.FileSet
	Filter   func(fs.FileInfo) bool
	Importer types.Importer

	IgnoreNotatedError bool
}

type GenFlags added in v1.1.8

type GenFlags int
const (
	GenFlagCheckOnly GenFlags = 1 << iota
	GenFlagSingleFile
	GenFlagPrintError
	GenFlagPrompt
)

type Importer added in v1.1.0

type Importer struct {
	// contains filtered or unexported fields
}

func NewImporter added in v1.1.0

func NewImporter(mod *gopmod.Module, gop *env.Gop, fset *token.FileSet) *Importer

func (*Importer) Import added in v1.1.0

func (p *Importer) Import(pkgPath string) (pkg *types.Package, err error)

Directories

Path Synopsis
ast
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.
mod
iox
ng
cl
Package cl compiles Go+ syntax trees (ast).
Package cl compiles Go+ syntax trees (ast).
cmd
gop
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.
fsx
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).
Package watcher monitors code changes in a Go+ workspace.
Package watcher monitors code changes in a Go+ workspace.
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL