Help us shape the future of Go! Take the 2026 Go Developer Survey

internal

package
v1.17.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package internal provides shared utilities for the mage build tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvWithCurrentGOOS

func EnvWithCurrentGOOS() ([]string, error)

EnvWithCurrentGOOS returns a copy of os.Environ with the GOOS and GOARCH set to runtime.GOOS and runtime.GOARCH.

func EnvWithGOOS

func EnvWithGOOS(goos, goarch string) ([]string, error)

EnvWithGOOS returns the os.Environ() values with GOOS and/or GOARCH either set to their runtime value, or the given value if non-empty.

func OutputDebug

func OutputDebug(cmd string, args ...string) (string, error)

OutputDebug runs a command in debug mode and returns its stdout output.

func RunDebug

func RunDebug(cmd string, args ...string) error

RunDebug runs a command in debug mode, logging the output.

func SetDebug

func SetDebug(l *log.Logger)

SetDebug sets the debug logger.

func SplitEnv added in v1.14.0

func SplitEnv(env []string) (map[string]string, error)

SplitEnv takes the results from os.Environ() (a []string of foo=bar values) and makes a map[string]string out of it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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