gogo

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: GPL-3.0 Imports: 8 Imported by: 4

README

server/gogo

Overview

Customizations for gogo/protobuf integration with the server. Tweaks protobuf handling and compatibility glue. Key routines cover GO within the gogo subsystem.

Go Files

  • go.go – Provides helper functions bridging gogo/protobuf with standard proto packages.
  • go_test.go (tests) – Tests the gogo compatibility helpers.

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) ([]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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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