Documentation
¶
Index ¶
- Constants
- func CleanTools()
- func EnvGet(key string) string
- func EnvRegister(key, value string)
- func EnvSet(key, value string)
- func EnvString() string
- func IgnoreBlacklist(args ...string) func(string) bool
- func Run(c string, args ...string) error
- func RunCombinedOutput(c string, args ...string) ([]byte, error)
- func RunDir(dir, c string, args ...string) error
- func RunDirCombinedOutput(dir, c string, args ...string) ([]byte, error)
- func RunDirExit(dir, c string, args ...string) int
- func RunDirOutput(dir, c string, args ...string) ([]byte, error)
- func RunEnv(env []string, c string, args ...string) error
- func RunEnvCombinedOutput(env []string, c string, args ...string) ([]byte, error)
- func RunEnvDir(env []string, dir, c string, args ...string) error
- func RunEnvDirCombinedOutput(env []string, dir, c string, args ...string) ([]byte, error)
- func RunEnvDirExit(env []string, dir, c string, args ...string) int
- func RunEnvDirOutput(env []string, dir, c string, args ...string) ([]byte, error)
- func RunEnvExit(env []string, c string, args ...string) int
- func RunEnvOutput(env []string, c string, args ...string) ([]byte, error)
- func RunExit(c string, args ...string) int
- func RunOutput(c string, args ...string) ([]byte, error)
- func ScanDirModTime(dir string, ignore func(string) bool) time.Time
- func SetWorkingModule(dir string)
- func ToolsDir() string
- func WorkingModuleDataDir() string
- func WorkingModuleDir() string
- func WorkingModulePath() string
- type Build
- type Target
Constants ¶
const ( BuildRelease = build.BuildRelease BuildDevelopment = build.BuildDevelopment BuildDebug = build.BuildDebug )
Variables ¶
This section is empty.
Functions ¶
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 ¶
IgnoreBlacklist returns an ignore function that returns true if the path is one of the args passed to IgnoreBlacklist.
func RunDirCombinedOutput ¶
func RunDirExit ¶
func RunEnvCombinedOutput ¶
func RunEnvDirCombinedOutput ¶
func RunEnvDirOutput ¶
func ScanDirModTime ¶
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.