github.com/go-task/task/v3/taskfile
No package summary is available.
Package
Files: 10. Third party imports: 13. Imports from organisation: 0. Tests: 0. Benchmarks: 0.
Constants
Vars
Types
CacheNode
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. | |
| source |
|
No comment on field. |
FileNode
A FileNode is a node that reads a taskfile from the local filesystem.
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. | |
| entrypoint |
|
No comment on field. |
GitNode
An GitNode is a node that reads a Taskfile from a remote location via Git.
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. | |
| url |
|
No comment on field. |
| rawUrl |
|
No comment on field. |
| ref |
|
No comment on field. |
| path |
|
No comment on field. |
HTTPNode
An HTTPNode is a node that reads a Taskfile from a remote location via HTTP.
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. | |
| url |
|
No comment on field. |
Node
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
RemoteNode
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
StdinNode
A StdinNode is a node that reads a taskfile from the standard input stream.
| Field name | Field type | Comment |
|---|---|---|
|
No comment on field. |
NodeOption, baseNode
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
| parent |
|
No comment on field. |
| dir |
|
No comment on field. |
| checksum |
|
No comment on field. |
DebugFunc, PromptFunc, ReaderOption, Reader
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
| type |
|
No comment on field. |
| type |
|
No comment on field. |
| graph |
|
No comment on field. |
| insecure |
|
No comment on field. |
| download |
|
No comment on field. |
| offline |
|
No comment on field. |
| tempDir |
|
No comment on field. |
| cacheExpiryDuration |
|
No comment on field. |
| debugFunc |
|
No comment on field. |
| promptFunc |
|
No comment on field. |
| promptMutex |
|
No comment on field. |
SnippetOption, Snippet
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| type |
|
No comment on field. |
| linesRaw |
|
No comment on field. |
| linesHighlighted |
|
No comment on field. |
| start |
|
No comment on field. |
| end |
|
No comment on field. |
| line |
|
No comment on field. |
| column |
|
No comment on field. |
| padding |
|
No comment on field. |
| noIndicators |
|
No comment on field. |
cacheExpiryDurationOption
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| duration |
|
No comment on field. |
columnOption
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| column |
|
No comment on field. |
debugFuncOption
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| debugFunc |
|
No comment on field. |
downloadOption
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| download |
|
No comment on field. |
insecureOption
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| insecure |
|
No comment on field. |
lineOption
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| line |
|
No comment on field. |
noIndicatorsOption
This type doesn't have documentation.
offlineOption
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| offline |
|
No comment on field. |
paddingOption
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| padding |
|
No comment on field. |
promptFuncOption
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| promptFunc |
|
No comment on field. |
tempDirOption
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| tempDir |
|
No comment on field. |
Functions
func Dotenv
func NewBaseNode
func NewCacheNode
func NewFileNode
func NewGitNode
func NewHTTPNode
func NewNode
func NewReader
NewReader constructs a new Taskfile [Reader] using the given Node and options.
Uses: ast.NewTaskfileGraph, os.TempDir, sync.Mutex.func NewRootNode
func NewSnippet
NewSnippet creates a new [Snippet] from a byte slice and a line and column number. The line and column numbers should be 1-indexed. For example, the first character in the file would be 1:1 (line 1, column 1). The padding determines the number of lines to include before and after the chosen line.
Uses: bytes.Buffer, quick.Highlight, strings.Split.func NewStdinNode
func RemoteExists
RemoteExists will check if a file at the given URL Exists. If it does, it will return its URL. If it does not, it will search the search for any files at the given URL with any of the default Taskfile files names. If any of these match a file, the first matching path will be returned. If no files are found, an error will be returned.
Uses: errors.TaskfileFetchFailedError, errors.TaskfileNotFoundError, fmt.Errorf, http.DefaultClient, http.NewRequestWithContext, http.StatusOK, slices.ContainsFunc, strings.Contains.func WithCacheExpiryDuration
WithCacheExpiryDuration sets the duration after which the cache is considered expired. By default, the cache is considered expired after 24 hours.
func WithChecksum
func WithColumn
WithColumn specifies the column number that the [Snippet] should point to.
func WithDebugFunc
WithDebugFunc sets the debug function to be used by the [Reader]. If set, this function will be called with debug messages. This can be useful if the caller wants to log debug messages from the [Reader]. By default, no debug function is set and the logs are not written.
func WithDownload
WithDownload forces the [Reader] to download a fresh copy of the taskfile from the remote source.
func WithInsecure
WithInsecure allows the [Reader] to make insecure connections when reading remote taskfiles. By default, insecure connections are rejected.
func WithLine
WithLine specifies the line number that the [Snippet] should center around and point to.
func WithNoIndicators
WithNoIndicators specifies that the [Snippet] should not include line or column indicators.
func WithOffline
WithOffline stops the [Reader] from being able to make network connections. It will still be able to read local files and cached copies of remote files.
func WithPadding
WithPadding specifies the number of lines to include before and after the selected line in the [Snippet].
func WithParent
func WithPromptFunc
WithPromptFunc sets the prompt function to be used by the [Reader]. If set, this function will be called with prompt messages. The function should optionally log the message to the user and return nil if the prompt is accepted and the execution should continue. Otherwise, it should return an error which describes why the prompt was rejected. This can then be caught and used later when calling the [Reader.Read] method. By default, no prompt function is set and all prompts are automatically accepted.
func WithTempDir
WithTempDir sets the temporary directory that will be used by the [Reader]. By default, the reader uses [os.TempDir].
func (*CacheNode) ChecksumPrompt
func (*CacheNode) CreateCacheDir
func (*CacheNode) Location
func (*CacheNode) Read
func (*CacheNode) ReadChecksum
func (*CacheNode) ReadTimestamp
func (*CacheNode) Write
func (*CacheNode) WriteChecksum
func (*CacheNode) WriteTimestamp
func (*FileNode) Location
func (*FileNode) Read
func (*FileNode) ResolveDir
func (*FileNode) ResolveEntrypoint
func (*GitNode) CacheKey
func (*GitNode) Location
func (*GitNode) Read
func (*GitNode) ReadContext
func (*GitNode) Remote
func (*GitNode) ResolveDir
func (*GitNode) ResolveEntrypoint
func (*HTTPNode) CacheKey
func (*HTTPNode) Location
func (*HTTPNode) Read
func (*HTTPNode) ReadContext
func (*HTTPNode) ResolveDir
func (*HTTPNode) ResolveEntrypoint
func (*Reader) Options
Options loops through the given [ReaderOption] functions and applies them to the [Reader].
func (*Reader) Read
Read will read the Taskfile defined by the [Reader]'s [Node] and recurse through any [ast.Includes] it finds, reading each included Taskfile and building an [ast.TaskfileGraph] as it goes. If any errors occur, they will be returned immediately.
func (*Snippet) Options
Options loops through the given [SnippetOption] functions and applies them to the [Snippet].
func (*Snippet) String
func (*StdinNode) Location
func (*StdinNode) Read
func (*StdinNode) Remote
func (*StdinNode) ResolveDir
func (*StdinNode) ResolveEntrypoint
func (*baseNode) Checksum
func (*baseNode) Dir
func (*baseNode) Parent
func (*baseNode) Verify
func (*cacheExpiryDurationOption) ApplyToReader
func (*columnOption) ApplyToSnippet
func (*debugFuncOption) ApplyToReader
func (*downloadOption) ApplyToReader
func (*insecureOption) ApplyToReader
func (*lineOption) ApplyToSnippet
func (*noIndicatorsOption) ApplyToSnippet
func (*offlineOption) ApplyToReader
func (*paddingOption) ApplyToSnippet
func (*promptFuncOption) ApplyToReader
func (*tempDirOption) ApplyToReader
Private functions
func checksum
func digits
func getScheme
func init
func splitURLOnDoubleSlash
func checksumPath
func filePath
func timestampPath
func debugf
func include
func promptf
func readNode
func readNodeContent
func readRemoteNodeContent
Tests
Files: 4. Third party imports: 2. Imports from organisation: 0. Tests: 9. Benchmarks: 0.