gogo

package
v0.0.6-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

README

Go Go

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ValidCompilerTargets - Supported compiler targets
	ValidCompilerTargets = map[string]bool{
		"darwin/386":    true,
		"darwin/amd64":  true,
		"linux/386":     true,
		"linux/amd64":   true,
		"windows/386":   true,
		"windows/amd64": true,
	}
)

Functions

func GetGoPathDir

func GetGoPathDir(appDir string) string

GetGoPathDir - Get the path to GOPATH

func GetGoRootDir

func GetGoRootDir(appDir string) string

GetGoRootDir - Get the path to GOROOT

func GetTempDir

func GetTempDir() string

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

func GoBuild

func GoBuild(config GoConfig, src string, dest string, buildmode string, tags []string, ldflags []string, gcflags, asmflags 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 GoVersion

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

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

Types

type GoConfig

type GoConfig struct {
	GOOS   string
	GOARCH string
	GOROOT string
	GOPATH string
	CGO    string
	CC     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