mirror of
https://github.com/go-task/task.git
synced 2025-05-13 22:16:31 +02:00
21 lines
392 B
Go
21 lines
392 B
Go
|
package errors
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
type TaskRCNotFoundError struct {
|
||
|
URI string
|
||
|
Walk bool
|
||
|
}
|
||
|
|
||
|
func (err TaskRCNotFoundError) Error() string {
|
||
|
var walkText string
|
||
|
if err.Walk {
|
||
|
walkText = " (or any of the parent directories)"
|
||
|
}
|
||
|
return fmt.Sprintf(`task: No Task config file found at %q%s`, err.URI, walkText)
|
||
|
}
|
||
|
|
||
|
func (err TaskRCNotFoundError) Code() int {
|
||
|
return CodeTaskRCNotFoundError
|
||
|
}
|