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

Method Get

taskfile/ast/vars.go:50–57  ·  view source on GitHub ↗

Get returns the value the the variable with the provided key and a boolean that indicates if the value was found or not. If the value is not found, the returned variable is a zero value and the bool is false.

(key string)

Source from the content-addressed store, hash-verified

48// that indicates if the value was found or not. If the value is not found, the
49// returned variable is a zero value and the bool is false.
50func (vars *Vars) Get(key string) (Var, bool) {
51 if vars == nil || vars.om == nil {
52 return Var{}, false
53 }
54 defer vars.mutex.RUnlock()
55 vars.mutex.RLock()
56 return vars.om.Get(key)
57}
58
59// Set sets the value of the variable with the provided key to the provided
60// value. If the variable already exists, its value is updated. If the variable

Callers 15

compiledTaskMethod · 0.95
DotenvFunction · 0.95
readDotEnvFilesMethod · 0.45
itemsFromForFunction · 0.45
promptTaskVarsMethod · 0.45
getMissingRequiredVarsFunction · 0.45
RunTaskMethod · 0.45
FindMatchingTasksMethod · 0.45
PrintTasksFunction · 0.45
IsUpToDateMethod · 0.45

Calls

no outgoing calls

Tested by 1