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

Method GetHash

hash.go:11–25  ·  view source on GitHub ↗
(t *ast.Task)

Source from the content-addressed store, hash-verified

9)
10
11func (e *Executor) GetHash(t *ast.Task) (string, error) {
12 r := cmp.Or(t.Run, e.Taskfile.Run)
13 var h hash.HashFunc
14 switch r {
15 case "always":
16 h = hash.Empty
17 case "once":
18 h = hash.Name
19 case "when_changed":
20 h = hash.Hash
21 default:
22 return "", fmt.Errorf(`task: invalid run "%s"`, r)
23 }
24 return h(t)
25}

Callers 1

startExecutionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected