goenv

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package goenv prepares reproducible Go build settings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SupportsCGO added in v0.4.3

func SupportsCGO(targetOS, arch string) bool

SupportsCGO reports whether CGO builds can target the OS and architecture.

Types

type Config

type Config struct {
	BuildFlags []string
	LDFlags    string
	Mode       string
	Env        map[string]string
}

Config contains environment overrides and command flags for a Go build.

func Prepare

func Prepare(options Options) Config

Prepare returns all environment overrides and flags needed for a build. An empty environment value means that an inherited variable must be removed.

type Options

type Options struct {
	Tags            []string
	Experiments     []string
	OS              string
	Arch            string
	CGO             bool
	GUI             bool
	Optimize        bool
	Dynamic         bool
	Minify          bool
	MetadataEntries int
	Cwd             string
}

Options describes the target and build characteristics.

Jump to

Keyboard shortcuts

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