conditions

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MacroMap = make(macro.MacroMap[condition.Macro])
)

Functions

func ConditionArch

func ConditionArch(s ...string) condition.Condition

ConditionArch checks if the given names contain current `runtime.GOARCH`

ConditionArch("amd64")
ConditionArch("arm", "arm64")

func ConditionOs

func ConditionOs(s ...string) condition.Condition

ConditionOs checks if the given names contain current `runtime.GOOS`

ConditionOs("windows")
ConditionOs("darwin", "linux")

func ConditionParent

func ConditionParent(s ...string) condition.Condition

ConditionParent checks if any parent directory contains one of the given file/directory

ConditionParent(".git")
ConditionParent("go.mod", "go.sum")

func ConditionPath

func ConditionPath(s ...string) condition.Condition

ConditionPath checks if any of the given executables are in PATH

ConditionPath("git")
ConditionPath("carapace", "go")

Types

This section is empty.

Jump to

Keyboard shortcuts

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