toolchain

package
v0.0.0-...-41bccd6 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

View Source
const (
	BuildRelease     = build.BuildRelease
	BuildDevelopment = build.BuildDevelopment
	BuildDebug       = build.BuildDebug
)

Variables

This section is empty.

Functions

func CleanTools

func CleanTools()

CleanTools clears out the folder located at ToolsDir()

func EnvGet

func EnvGet(key string) string

EnvGet registers the env var for printing and returns the current value.

func EnvRegister

func EnvRegister(key, value string)

EnvRegister registers the env var for printing and sets it to value if it has no current value.

func EnvSet

func EnvSet(key, value string)

EnvSet registers the env var for printing and always sets it to value.

func EnvString

func EnvString() string

EnvString returns a string containing every registered env var and its' value.

func IgnoreBlacklist

func IgnoreBlacklist(args ...string) func(string) bool

IgnoreBlacklist returns an ignore function that returns true if the path is one of the args passed to IgnoreBlacklist.

func Run

func Run(c string, args ...string) error

func RunCombinedOutput

func RunCombinedOutput(c string, args ...string) ([]byte, error)

func RunDir

func RunDir(dir, c string, args ...string) error

func RunDirCombinedOutput

func RunDirCombinedOutput(dir, c string, args ...string) ([]byte, error)

func RunDirExit

func RunDirExit(dir, c string, args ...string) int

func RunDirOutput

func RunDirOutput(dir, c string, args ...string) ([]byte, error)

func RunEnv

func RunEnv(env []string, c string, args ...string) error

func RunEnvCombinedOutput

func RunEnvCombinedOutput(env []string, c string, args ...string) ([]byte, error)

func RunEnvDir

func RunEnvDir(env []string, dir, c string, args ...string) error

func RunEnvDirCombinedOutput

func RunEnvDirCombinedOutput(env []string, dir, c string, args ...string) ([]byte, error)

func RunEnvDirExit

func RunEnvDirExit(env []string, dir, c string, args ...string) int

func RunEnvDirOutput

func RunEnvDirOutput(env []string, dir, c string, args ...string) ([]byte, error)

func RunEnvExit

func RunEnvExit(env []string, c string, args ...string) int

func RunEnvOutput

func RunEnvOutput(env []string, c string, args ...string) ([]byte, error)

func RunExit

func RunExit(c string, args ...string) int

func RunOutput

func RunOutput(c string, args ...string) ([]byte, error)

func ScanDirModTime

func ScanDirModTime(dir string, ignore func(string) bool) time.Time

ScanDirModTime scans recursively dir and returns the last time a file was modified or error. ignore is a function that takes in a path relative to dir and if it returns true, the path is skipped. If dir does not exist, returns time.Unix(0, 0)

func SetWorkingModule

func SetWorkingModule(dir string)

SetWorkingModule sets the working module to what module dir belongs to if found. If no module is found then module dir will be set to dir with WorkingModulePath() an empty string. It only affects the WorkingModule[Path|Dir|DataDir] functions. It does not actually change os.Getwd().

func ToolsDir

func ToolsDir() string

ToolsDir returns a path within WorkingModuleDataDir() to be used to store tools needed to build the module.

func WorkingModuleDataDir

func WorkingModuleDataDir() string

WorkingModuleDataDir returns a folder within WorkingModuleDir() that can be used to store data.

func WorkingModuleDir

func WorkingModuleDir() string

WorkingModulePath returns the filepath of the module in the last call to SetWorkingModule, if no module was found this will be equal to what was passed to SetWorkingModule.

func WorkingModulePath

func WorkingModulePath() string

WorkingModulePath returns the module path of the module in the last call to SetWorkingModule or an empty string if no module is found.

Types

type Build

type Build = build.Build

type Target

type Target struct {
	OS   string
	Arch string
}

func (Target) CrossCompiling

func (t Target) CrossCompiling() bool

func (Target) String

func (t Target) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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