gogo

package
v1.15.16 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: GPL-3.0 Imports: 8 Imported by: 3

README

Go Go

The gogo package is a Go wrapper around the Go compiler toolchain.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GarbleCmd added in v1.4.0

func GarbleCmd(config GoConfig, cwd string, command []string) ([]byte, error)

GarbleCmd - Execute a go command

func GetGoCache added in v1.4.0

func GetGoCache(appDir string) string

GetGoCache - Get the OS temp dir (used for GOCACHE)

func GetGoModCache added in v1.4.0

func GetGoModCache(appDir string) string

GetGoModCache - Get the GoMod cache dir

func GetGoRootDir

func GetGoRootDir(appDir string) string

GetGoRootDir - Get the path to GOROOT

func GoBuild

func GoBuild(config GoConfig, src string, dest string, buildmode string, tags []string, ldflags []string, gcflags, asmflags string, trimpath string) ([]byte, error)

GoBuild - Execute a go build command, returns stdout/error

func GoCmd

func GoCmd(config GoConfig, cwd string, command []string) ([]byte, error)

GoCmd - Execute a go command

func GoMod added in v1.4.0

func GoMod(config GoConfig, src string, args []string) ([]byte, error)

GoMod - Execute go module commands in src dir

func GoToolDistList added in v1.4.18

func GoToolDistList(config GoConfig) []string

GoToolDistList - Get a list of supported GOOS/GOARCH pairs

func GoVersion

func GoVersion(config GoConfig) ([]byte, error)

GoVersion - Execute a go version command, returns stdout/error

func ValidCompilerTargets

func ValidCompilerTargets(config GoConfig) map[string]bool

ValidCompilerTargets - Returns a map of valid compiler targets

Types

type GoConfig

type GoConfig struct {
	ProjectDir string

	GOOS       string
	GOARCH     string
	GOROOT     string
	GOCACHE    string
	GOMODCACHE string
	GOPROXY    string
	CGO        string
	CC         string
	CXX        string
	HTTPPROXY  string
	HTTPSPROXY string

	Obfuscation bool
	GOGARBLE    string
}

GoConfig - Env variables for Go compiler

Jump to

Keyboard shortcuts

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