1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

feat: better yaml parsing and error handling (#1619)

This commit is contained in:
Pete Davison
2024-05-16 02:24:02 +01:00
committed by GitHub
parent 635e3f4e7d
commit 8d138a5eea
21 changed files with 299 additions and 77 deletions

View File

@@ -12,14 +12,14 @@ const (
const (
CodeTaskfileNotFound int = iota + 100
CodeTaskfileAlreadyExists
CodeTaskfileInvalid
CodeTaskfileDecode
CodeTaskfileFetchFailed
CodeTaskfileNotTrusted
CodeTaskfileNotSecure
CodeTaskfileCacheNotFound
CodeTaskfileVersionCheckError
CodeTaskfileNetworkTimeout
_ // CodeTaskfileDuplicateInclude
CodeTaskfileInvalid
CodeTaskfileCycle
)
@@ -58,3 +58,8 @@ func Is(err, target error) bool {
func As(err error, target any) bool {
return errors.As(err, target)
}
// Unwrap wraps the standard errors.Unwrap function so that we don't need to alias that package.
func Unwrap(err error) error {
return errors.Unwrap(err)
}