Documentation ¶
Index ¶
- Variables
- func HasCustomVariablePrefix(name string) bool
- func IsDeprecatedVariable(name string) (exists bool)
- func IsOfficialVariable(name string) bool
- func IsValidArch(arch string) bool
- func IsValidOption(option string) bool
- func MakeFile(program string) (f io.Reader)
- func ParseHeredocs(stmts []*syntax.Stmt) (heredocs []*syntax.Word)
- type Apkbuild
- type Call
- type Environ
- type Function
- type Variable
- type VariableScope
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // A poor mans set OfficialVariables = map[string]bool{ "HOSTCC": true, "arch": true, "builddir": true, "checkdepends": true, "depends": true, "depends_dev": true, "depends_doc": true, "depends_libs": true, "depends_openrc": true, "depends_static": true, "giturl": true, "install": true, "install_if": true, "langdir": true, "ldpath": true, "license": true, "linguas": true, "maintainer": true, "makedepends": true, "makedepends_build": true, "makedepends_host": true, "md5sums": true, "options": true, "patch_args": true, "pcprefix": true, "pkgdesc": true, "pkgdir": true, "pkggroups": true, "pkgname": true, "pkgrel": true, "pkgusers": true, "pkgver": true, "provider_priority": true, "provides": true, "replaces": true, "replaces_priority": true, "sha256sums": true, "sha512sums": true, "somask": true, "sonameprefix": true, "source": true, "srcdir": true, "startdir": true, "subpackages": true, "subpkgdir": true, "triggers": true, "url": true, } DeprecatedVariables = map[string]struct{}{ "cpandepends": {}, "cpanmakedepends": {}, "cpancheckdepends": {}, } Options = map[string]struct{}{ "!archcheck": {}, "!check": {}, "!dbg": {}, "!fhs": {}, "!spdx": {}, "!strip": {}, "!tracedeps": {}, "bigdocs": {}, "charset.alias": {}, "checkroot": {}, "chmod-clean": {}, "ldpath-recursive": {}, "lib64": {}, "libtool": {}, "net": {}, "setcap": {}, "sover-namecheck": {}, "suid": {}, "textrels": {}, "toolchain": {}, } Arches = map[string]struct{}{ "x86_64": {}, "x86": {}, "aarch64": {}, "armv7": {}, "armhf": {}, "ppc64le": {}, "s390x": {}, "riscv64": {}, "mips": {}, "mips64": {}, "loongarch64": {}, } )
Functions ¶
Types ¶
type Apkbuild ¶
type Apkbuild struct { File *syntax.File GlobalVariables VariableScope Functions []Function Lines []string Heredocs []*syntax.Word }
type Call ¶
type Environ ¶
type Environ struct {
VariableScope
}
type Function ¶
type Variable ¶
type VariableScope ¶
type VariableScope []Variable
func (VariableScope) Get ¶
func (v VariableScope) Get(name string) optional.Option[Variable]
func (VariableScope) GetValue ¶
func (v VariableScope) GetValue(name string) string
func (VariableScope) Iter ¶
func (v VariableScope) Iter(f func(Variable))
Iter calls the provided function for each variable and provides the variable to the function. If the function returns false, the iteration will stop.
func (VariableScope) IterVar ¶
func (v VariableScope) IterVar(name string, f func(Variable))
IterVar calls the provided function for each variable where the name matches provided name and provides the variable to the function. If the function returns false, the iteration will stop.
Click to show internal directories.
Click to hide internal directories.