MCPcopy Create free account

hub / github.com/go-task/task / functions

Functions992 in github.com/go-task/task

↓ 143 callersMethodString
()
taskfile/snippet.go:140
↓ 109 callersMethodRun
Run runs Task
task.go:42
↓ 85 callersFunctionWithExecutorOptions
WithExecutorOptions sets the [task.ExecutorOption]s to be used when creating a [task.Executor].
task_test.go:185
↓ 80 callersFunctionNewExecutorTest
NewExecutorTest sets up a new [task.Executor] with the given options and runs a task with the given [ExecutorTestOption]s. The output of the task is w
executor_test.go:46
↓ 77 callersFunctionSmartJoin
SmartJoin joins two paths, but only if the second is not already an absolute path.
internal/filepathext/filepathext.go:11
↓ 73 callersFunctionWithName
Functional options WithName gives the test fixture output a name. This should be used when running multiple tests in a single test function.
task_test.go:130
↓ 72 callersMethodSetup
()
setup.go:26
↓ 67 callersMethodRun
(t *testing.T)
task_test.go:408
↓ 67 callersFunctionWithTask
WithTask sets the name of the task to run. This should be used when the task to run is not the default task.
task_test.go:148
↓ 63 callersFunctionNewTaskfileDecodeError
(err error, node *yaml.Node)
errors/error_taskfile_decode.go:26
↓ 53 callersMethodError
()
errors/errors_task.go:41
↓ 45 callersMethodOutf
Outf prints stuff to STDOUT.
internal/logger/logger.go:143
↓ 45 callersMethodSet
Set sets the value of the variable with the provided key to the provided value. If the variable already exists, its value is updated. If the variable
taskfile/ast/vars.go:62
↓ 36 callersFunctionNewVars
NewVars creates a new instance of Vars and initializes it with the provided set of elements, if any. The elements are added in the order they are pass
taskfile/ast/vars.go:27
↓ 31 callersMethodGet
Get returns the value the the variable with the provided key and a boolean that indicates if the value was found or not. If the value is not found, th
taskfile/ast/vars.go:50
↓ 28 callersFunctionReplace
(v T, cache *Cache)
internal/templater/templater.go:61
↓ 27 callersMethodDeepCopy
()
internal/deepcopy/deepcopy.go:10
↓ 26 callersMethodAll
All returns an iterator that loops over all task key-value pairs.
taskfile/ast/vars.go:75
↓ 25 callersMethodLocation
()
taskfile/node.go:19
↓ 24 callersMethodLen
Len returns the number of variables in the Vars map.
taskfile/ast/vars.go:38
↓ 23 callersMethodDir
()
taskfile/node.go:20
↓ 23 callersFunctionNew
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 sta
errors/errors.go:55
↓ 23 callersFunctiongetConfig
getConfig extracts a config value with priority: env var > taskrc config > fallback
internal/flags/flags.go:318
↓ 21 callersMethodReturn
(s string)
internal/fingerprint/checker_mock.go:211
↓ 21 callersMethodRun
(run func())
internal/fingerprint/checker_mock.go:204
↓ 21 callersFunctionWithColumn
WithColumn specifies the column number that the [Snippet] should point to.
taskfile/snippet.go:102
↓ 21 callersFunctionWithRunError
WithRunError tells the test to expect an error during the run phase of the task execution. A fixture will be created with the output of any errors.
executor_test.go:93
↓ 20 callersMethodErr
()
internal/templater/templater.go:30
↓ 20 callersMethodErrf
Errf prints stuff to STDERR.
internal/logger/logger.go:167
↓ 20 callersFunctionSlice
(orig []T)
internal/deepcopy/deepcopy.go:22
↓ 20 callersFunctionWithLine
WithLine specifies the line number that the [Snippet] should center around and point to.
taskfile/snippet.go:89
↓ 19 callersFunctionNewGitNode
( entrypoint string, dir string, insecure bool, opts ...NodeOption, )
taskfile/node_git.go:61
↓ 19 callersMethodWithTypeMessage
(t string)
errors/error_taskfile_decode.go:118
↓ 17 callersMethodName
()
taskfile/ast/task.go:56
↓ 16 callersFunctionGlobs
(dir string, globs []*ast.Glob, useGitignore bool)
internal/fingerprint/glob.go:13
↓ 15 callersFunctionwriteFile
(t *testing.T, dir, filename, content string)
taskrc/taskrc_test.go:53
↓ 14 callersMethodError
()
taskfile/ast/platforms.go:33
↓ 14 callersMethodIsUpToDate
(ctx context.Context, t *ast.Task)
internal/fingerprint/checker.go:11
↓ 14 callersMethodrepoCacheKey
repoCacheKey generates a unique cache key for the repository+ref combination. Unlike CacheKey() which includes the file path, this identifies the repo
taskfile/node_git.go:235
↓ 13 callersFunctionGetConfig
GetConfig loads and merges local and global Task configuration files
taskrc/taskrc.go:26
↓ 13 callersFunctionIs
Is wraps the standard errors.Is function so that we don't need to alias that package.
errors/errors.go:60
↓ 13 callersFunctionWithVar
WithVar sets a variable to be passed to the task. This can be called multiple times to set more than one variable.
task_test.go:166
↓ 13 callersFunctionenvColor
(name string, defaultColor color.Attribute)
internal/logger/logger.go:103
↓ 12 callersMethodClose
()
internal/execext/devnull.go:13
↓ 12 callersMethodEXPECT
()
internal/fingerprint/checker_mock.go:37
↓ 12 callersFunctionReplaceWithExtra
(v T, cache *Cache, extra map[string]any)
internal/templater/templater.go:65
↓ 12 callersMethodVerboseErrf
VerboseErrf prints stuff to STDERR if verbose mode is enabled.
internal/logger/logger.go:179
↓ 11 callersFunctionPrintTask
(l *logger.Logger, t *ast.Task)
internal/summary/summary.go:31
↓ 11 callersFunctionbuildHTTPClient
buildHTTPClient creates an HTTP client with optional TLS configuration. If no certificate options are provided, it returns http.DefaultClient.
taskfile/node_http.go:29
↓ 10 callersMethodFOutf
FOutf prints stuff to the given writer.
internal/logger/logger.go:148
↓ 10 callersFunctionWithPadding
WithPadding specifies the number of lines to include before and after the selected line in the [Snippet].
taskfile/snippet.go:116
↓ 10 callersMethoddebugf
(format string, a ...any)
taskfile/reader.go:262
↓ 9 callersFunctionExpandLiteral
ExpandLiteral is a wrapper around [expand.Literal]. It will escape the input string, expand any shell symbols (such as '~') and resolve any environmen
internal/execext/exec.go:105
↓ 9 callersFunctionGetTaskEnv
(key string)
internal/env/env.go:63
↓ 9 callersMethodToCacheMap
ToCacheMap converts Vars to an unordered map containing only the static variables
taskfile/ast/vars.go:100
↓ 9 callersMethodWithMessage
(format string, a ...any)
errors/error_taskfile_decode.go:113
↓ 9 callersMethodWrapWriter
(stdOut, stdErr io.Writer, prefix string, cache *templater.Cache)
internal/output/output.go:13
↓ 9 callersFunctionsetupDirs
(t *testing.T)
taskrc/taskrc_test.go:35
↓ 8 callersMethodVerboseOutf
VerboseOutf prints stuff to STDOUT if verbose mode is enabled.
internal/logger/logger.go:160
↓ 8 callersFunctioncreateDummyLogger
()
internal/summary/summary_test.go:32
↓ 7 callersMethodEnabled
()
experiments/experiment.go:38
↓ 7 callersFunctionIsAbs
(path string)
internal/filepathext/filepathext.go:18
↓ 7 callersMethodShouldUseGitignore
ShouldUseGitignore returns true if gitignore filtering is enabled for the task. Returns false if UseGitignore is nil or set to false.
taskfile/ast/task.go:81
↓ 7 callersFunctionWithFixtureTemplating
WithFixtureTemplating enables templating for the golden fixture files with the default set of data. This is useful if the golden file is dynamic in so
task_test.go:260
↓ 7 callersFunctionWithPostProcessFn
WithPostProcessFn adds a [PostProcessFn] function to the test. Post-process functions are run on the output of the task before a fixture is created. T
task_test.go:224
↓ 7 callersFunctionasAnySlice
(slice []T)
variables.go:349
↓ 7 callersFunctiongetScheme
(uri string)
taskfile/node.go:87
↓ 7 callersFunctioninitGitRepo
(t *testing.T, dir string)
internal/fingerprint/gitignore_test.go:15
↓ 6 callersFunctionConvert
(s []T, f func(T) U)
internal/slicesext/slicesext.go:22
↓ 6 callersMethodGetTask
GetTask will return the task with the name matching the given call from the taskfile. If no task is found, it will search for tasks with a matching al
task.go:523
↓ 6 callersMethodMatch
Match matches patterns in the order of priorities. As soon as an inclusion or exclusion is found, not further matching is performed.
internal/gitignore/matcher.go:11
↓ 6 callersMethodMerge
Merge loops over other and merges it values with the variables in vars. If the include parameter is not nil and its it is an advanced import, the dire
taskfile/ast/vars.go:125
↓ 6 callersFunctionNew
New creates a new experiment with the given name and sets the values that can enable it.
experiments/experiment.go:19
↓ 6 callersFunctionRunCommand
RunCommand runs a shell command
internal/execext/exec.go:35
↓ 6 callersMethodRunTask
RunTask runs a task by its name
task.go:128
↓ 6 callersFunctionScalar
(orig *T)
internal/deepcopy/deepcopy.go:13
↓ 6 callersMethodSet
Set sets the value of the task with the provided key to the provided value. If the task already exists, its value is updated. If the task does not exi
taskfile/ast/tasks.go:66
↓ 6 callersFunctionnormalizePathSeparators
normalizePathSeparators converts backslashes to forward slashes for cross-platform path comparison.
task_test.go:326
↓ 6 callersFunctionrun
()
cmd/task/task.go:60
↓ 6 callersFunctiontaskNameWithNamespace
(taskName string, namespace string)
taskfile/ast/tasks.go:246
↓ 6 callersMethodwriteFixtureBuffer
writeFixtureBuffer is a wrapper for writing the main output of the task to a fixture file.
task_test.go:106
↓ 5 callersFunctionAs
As wraps the standard errors.As function so that we don't need to alias that package.
errors/errors.go:65
↓ 5 callersFunctionGet
(t *ast.Task)
internal/env/env.go:28
↓ 5 callersFunctionIsRemoteEntrypoint
(entrypoint string)
taskfile/node.go:77
↓ 5 callersMethodLocation
()
taskfile/node_git.go:93
↓ 5 callersFunctionNewFormatterTest
NewFormatterTest sets up a new [task.Executor] with the given options and runs a task with the given [FormatterTestOption]s. The output of the task is
formatter_test.go:41
↓ 5 callersFunctionNewTasks
NewTasks creates a new instance of Tasks and initializes it with the provided set of elements, if any. The elements are added in the order they are pa
taskfile/ast/tasks.go:31
↓ 5 callersFunctionReplaceVars
(vars *ast.Vars, cache *Cache)
internal/templater/templater.go:147
↓ 5 callersMethodResolveEntrypoint
(entrypoint string)
taskfile/node_git.go:189
↓ 5 callersFunctionSearchPath
SearchPath will check if a file at the given path exists or not. If it does, it will return the path to it. If it does not, it will search for any fil
internal/fsext/fs.go:122
↓ 5 callersMethodString
()
errors/errors_task.go:161
↓ 5 callersMethodValues
Values returns an iterator that loops over all task values.
taskfile/ast/vars.go:91
↓ 5 callersFunctionWithListOptions
Functional options WithListOptions sets the list options for the formatter.
formatter_test.go:73
↓ 5 callersMethodrun
(t *testing.T)
task_test.go:681
↓ 5 callersMethodwriteFixture
writeFixture writes a fixture file for the test. The fixture file is created using the [goldie.Goldie] package. The fixture file is created with the o
task_test.go:69
↓ 4 callersMethodCompiledTask
CompiledTask returns a copy of a task, but replacing variables in almost all properties using the Go template package.
variables.go:34
↓ 4 callersMethodFastCompiledTask
FastCompiledTask is like CompiledTask, but it skippes dynamic variables.
variables.go:39
↓ 4 callersMethodGet
Get returns the value the the task with the provided key and a boolean that indicates if the value was found or not. If the value is not found, the re
taskfile/ast/tasks.go:54
↓ 4 callersFunctionIsTaskUpToDate
( ctx context.Context, t *ast.Task, opts ...CheckerOption, )
internal/fingerprint/task.go:58
↓ 4 callersMethodListTasks
ListTasks prints a list of tasks. Tasks that match the given filters will be excluded from the list. The function returns a boolean indicating whether
help.go:62
next →1–100 of 992, ranked by callers