MCPcopy
hub / github.com/go-task/task / GetEnviron

Function GetEnviron

internal/env/env.go:18–26  ·  view source on GitHub ↗

GetEnviron the all return all environment variables encapsulated on a ast.Vars

()

Source from the content-addressed store, hash-verified

16// GetEnviron the all return all environment variables encapsulated on a
17// ast.Vars
18func GetEnviron() *ast.Vars {
19 m := ast.NewVars()
20 for _, e := range os.Environ() {
21 keyVal := strings.SplitN(e, "=", 2)
22 key, val := keyVal[0], keyVal[1]
23 m.Set(key, ast.Var{Value: val})
24 }
25 return m
26}
27
28func Get(t *ast.Task) []string {
29 if t.Env == nil {

Callers 2

getVariablesMethod · 0.92
includeMethod · 0.92

Calls 2

SetMethod · 0.95
NewVarsFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…