Go API Documentation

github.com/go-task/task/v3/errors

No package summary is available.

Package

Files: 5. Third party imports: 4. Imports from organisation: 0. Tests: 0. Benchmarks: 0.

Constants

Vars

Types

MissingVar

This type doesn't have documentation.

Field name Field type Comment
Name

string

No comment on field.
AllowedValues

[]string

No comment on field.

NotAllowedVar

This type doesn't have documentation.

Field name Field type Comment
Value

string

No comment on field.
Enum

[]string

No comment on field.
Name

string

No comment on field.

TaskCalledTooManyTimesError

TaskCalledTooManyTimesError is returned when the maximum task call limit is exceeded. This is to prevent infinite loops and cyclic dependencies.

Field name Field type Comment
TaskName

string

No comment on field.
MaximumTaskCall

int

No comment on field.

TaskCancelledByUserError

TaskCancelledByUserError is returned when the user does not accept an optional prompt to continue.

Field name Field type Comment
TaskName

string

No comment on field.

TaskCancelledNoTerminalError

TaskCancelledNoTerminalError is returned when trying to run a task with a prompt in a non-terminal environment.

Field name Field type Comment
TaskName

string

No comment on field.

TaskError

TaskError extends the standard error interface with a Code method. This code will be used as the exit code of the program which allows the user to distinguish between different types of errors.

Field name Field type Comment
type

any

No comment on field.

TaskInternalError

TaskInternalError when the user attempts to invoke a task that is internal.

Field name Field type Comment
TaskName

string

No comment on field.

TaskMissingRequiredVarsError

This type doesn't have documentation.

Field name Field type Comment
TaskName

string

No comment on field.
MissingVars

[]MissingVar

No comment on field.

TaskNameConflictError

TaskNameConflictError is returned when multiple tasks with a matching name or alias are found.

Field name Field type Comment
Call

string

No comment on field.
TaskNames

[]string

No comment on field.

TaskNameFlattenConflictError

This type doesn't have documentation.

Field name Field type Comment
TaskName

string

No comment on field.
Include

string

No comment on field.

TaskNotAllowedVarsError

This type doesn't have documentation.

Field name Field type Comment
TaskName

string

No comment on field.
NotAllowedVars

[]NotAllowedVar

No comment on field.

TaskNotFoundError

TaskNotFoundError is returned when the specified task is not found in the Taskfile.

Field name Field type Comment
TaskName

string

No comment on field.
DidYouMean

string

No comment on field.

TaskRCNotFoundError

This type doesn't have documentation.

Field name Field type Comment
URI

string

No comment on field.
Walk

bool

No comment on field.

TaskRunError

TaskRunError is returned when a command in a task returns a non-zero exit code.

Field name Field type Comment
TaskName

string

No comment on field.
Err

error

No comment on field.

TaskfileAlreadyExistsError

TaskfileAlreadyExistsError is returned on creating a Taskfile if one already exists.

TaskfileCacheNotFoundError

TaskfileCacheNotFoundError is returned when the user attempts to use an offline (cached) Taskfile but the files does not exist in the cache.

Field name Field type Comment
URI

string

No comment on field.

TaskfileCycleError

TaskfileCycleError is returned when we detect that a Taskfile includes a set of Taskfiles that include each other in a cycle.

Field name Field type Comment
Source

string

No comment on field.
Destination

string

No comment on field.

TaskfileDecodeError

This type doesn't have documentation.

Field name Field type Comment
Message

string

No comment on field.
Location

string

No comment on field.
Line

int

No comment on field.
Column

int

No comment on field.
Tag

string

No comment on field.
Snippet

string

No comment on field.
Err

error

No comment on field.

TaskfileDoesNotMatchChecksum

TaskfileDoesNotMatchChecksum is returned when a Taskfile's checksum does not match the one pinned in the parent Taskfile.

Field name Field type Comment
URI

string

No comment on field.
ExpectedChecksum

string

No comment on field.
ActualChecksum

string

No comment on field.

TaskfileFetchFailedError

TaskfileFetchFailedError is returned when no appropriate Taskfile is found when searching the filesystem.

Field name Field type Comment
URI

string

No comment on field.
HTTPStatusCode

int

No comment on field.

TaskfileInvalidError

TaskfileInvalidError is returned when the Taskfile contains syntax errors or cannot be parsed for some reason.

Field name Field type Comment
URI

string

No comment on field.
Err

error

No comment on field.

TaskfileNetworkTimeoutError

TaskfileNetworkTimeoutError is returned when the user attempts to use a remote Taskfile but a network connection could not be established within the timeout.

Field name Field type Comment
URI

string

No comment on field.
Timeout

time.Duration

No comment on field.

TaskfileNotFoundError

TaskfileNotFoundError is returned when no appropriate Taskfile is found when searching the filesystem.

Field name Field type Comment
URI

string

No comment on field.
Walk

bool

No comment on field.

TaskfileNotSecureError

TaskfileNotSecureError is returned when the user attempts to download a remote Taskfile over an insecure connection.

Field name Field type Comment
URI

string

No comment on field.

TaskfileNotTrustedError

TaskfileNotTrustedError is returned when the user does not accept the trust prompt when downloading a remote Taskfile.

Field name Field type Comment
URI

string

No comment on field.

TaskfileVersionCheckError

TaskfileVersionCheckError is returned when the user attempts to run a Taskfile that does not contain a Taskfile schema version key or if they try to use a feature that is not supported by the schema version.

Field name Field type Comment
URI

string

No comment on field.
SchemaVersion

*semver.Version

No comment on field.
Message

string

No comment on field.

Functions

func As

As wraps the standard errors.As function so that we don't need to alias that package.

Uses: errors.As.

func Is

Is wraps the standard errors.Is function so that we don't need to alias that package.

Uses: errors.Is.

func New

New returns an error that formats as the given text. Each call to New returns a distinct error value even if the text is identical. This wraps the standard errors.New function so that we don't need to alias that package.

Uses: errors.New.

func NewTaskfileDecodeError

Uses: errors.As.

func Unwrap

Unwrap wraps the standard errors.Unwrap function so that we don't need to alias that package.

Uses: errors.Unwrap.

func (*TaskCalledTooManyTimesError) Code

func (*TaskCalledTooManyTimesError) Error

Uses: fmt.Sprintf.

func (*TaskCancelledByUserError) Code

func (*TaskCancelledByUserError) Error

Uses: fmt.Sprintf.

func (*TaskCancelledNoTerminalError) Code

func (*TaskCancelledNoTerminalError) Error

Uses: fmt.Sprintf.

func (*TaskInternalError) Code

func (*TaskInternalError) Error

Uses: fmt.Sprintf.

func (*TaskMissingRequiredVarsError) Code

func (*TaskMissingRequiredVarsError) Error

Uses: fmt.Sprintf, strings.Join.

func (*TaskNameConflictError) Code

func (*TaskNameConflictError) Error

Uses: fmt.Sprintf, strings.Join.

func (*TaskNameFlattenConflictError) Code

func (*TaskNameFlattenConflictError) Error

Uses: fmt.Sprintf.

func (*TaskNotAllowedVarsError) Code

func (*TaskNotAllowedVarsError) Error

Uses: fmt.Sprintf, strings.Builder.

func (*TaskNotFoundError) Code

func (*TaskNotFoundError) Error

Uses: fmt.Sprintf.

func (*TaskRunError) Code

func (*TaskRunError) Error

Uses: fmt.Sprintf.

func (*TaskRunError) TaskExitCode

Uses: interp.IsExitStatus.

func (*TaskfileCacheNotFoundError) Code

func (*TaskfileCacheNotFoundError) Error

Uses: fmt.Sprintf.

func (*TaskfileDecodeError) Code

func (*TaskfileDecodeError) Debug

Uses: bytes.Buffer, cmp.Or, errors.As, errors.Unwrap, fmt.Fprintf, fmt.Fprintln, strings.Repeat.

func (*TaskfileDecodeError) Error

Uses: bytes.Buffer, color.RedString, errors.As, fmt.Fprint, fmt.Fprintln.

func (*TaskfileDecodeError) Unwrap

func (*TaskfileDecodeError) WithFileInfo

func (*TaskfileDecodeError) WithMessage

Uses: fmt.Sprintf.

func (*TaskfileDecodeError) WithTypeMessage

Uses: fmt.Sprintf.

func (*TaskfileDoesNotMatchChecksum) Code

func (*TaskfileDoesNotMatchChecksum) Error

Uses: fmt.Sprintf.

func (*TaskfileNetworkTimeoutError) Code

func (*TaskfileNetworkTimeoutError) Error

Uses: fmt.Sprintf.

func (*TaskfileNotSecureError) Code

func (*TaskfileNotSecureError) Error

Uses: fmt.Sprintf.

func (*TaskfileNotTrustedError) Code

func (*TaskfileNotTrustedError) Error

Uses: fmt.Sprintf.

func (*TaskfileVersionCheckError) Code

func (*TaskfileVersionCheckError) Error

Uses: fmt.Sprintf.

func (MissingVar) String

Uses: fmt.Sprintf.

func (TaskRCNotFoundError) Code

func (TaskRCNotFoundError) Error

Uses: fmt.Sprintf.

func (TaskfileAlreadyExistsError) Code

func (TaskfileAlreadyExistsError) Error

func (TaskfileCycleError) Code

func (TaskfileCycleError) Error

Uses: fmt.Sprintf.

func (TaskfileFetchFailedError) Code

func (TaskfileFetchFailedError) Error

Uses: fmt.Sprintf, http.StatusText.

func (TaskfileInvalidError) Code

func (TaskfileInvalidError) Error

Uses: fmt.Sprintf.

func (TaskfileNotFoundError) Code

func (TaskfileNotFoundError) Error

Uses: fmt.Sprintf.

Private functions

func extractTypeErrorMessage