MCPcopy Index your code
hub / github.com/go-task/task / Get

Method Get

taskfile/ast/tasks.go:54–61  ·  view source on GitHub ↗

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

(key string)

Source from the content-addressed store, hash-verified

52// indicates if the value was found or not. If the value is not found, the
53// returned task is a zero value and the bool is false.
54func (tasks *Tasks) Get(key string) (*Task, bool) {
55 if tasks == nil || tasks.om == nil {
56 return &Task{}, false
57 }
58 defer tasks.mutex.RUnlock()
59 tasks.mutex.RLock()
60 return tasks.om.Get(key)
61}
62
63// Set sets the value of the task with the provided key to the provided value.
64// If the task already exists, its value is updated. If the task does not exist,

Callers 1

MergeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected