MCPcopy Create free account
hub / github.com/go-task/task / Error

Method Error

errors/errors_task.go:195–204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193}
194
195func (err *TaskNotAllowedVarsError) Error() string {
196 var builder strings.Builder
197
198 builder.WriteString(fmt.Sprintf("task: Task %q cancelled because it is missing required variables:\n", err.TaskName)) //nolint:staticcheck
199 for _, s := range err.NotAllowedVars {
200 builder.WriteString(fmt.Sprintf(" - %s has an invalid value : '%s' (allowed values : %v)\n", s.Name, s.Value, s.Enum)) //nolint:staticcheck
201 }
202
203 return builder.String()
204}
205
206func (err *TaskNotAllowedVarsError) Code() int {
207 return CodeTaskNotAllowedVars

Callers

nothing calls this directly

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected