taskrc

package
v3.45.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2025 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig added in v3.45.0

func GetConfig(dir string) (*ast.TaskRC, error)

GetConfig loads and merges local and global Task configuration files

Types

type DebugFunc

type DebugFunc func(string)

DebugFunc is a function that can be called to log debug messages.

type Node

type Node struct {
	// contains filtered or unexported fields
}

func NewNode

func NewNode(
	entrypoint string,
	dir string,
	possibleFileNames []string,
) (*Node, error)

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

A Reader will recursively read Taskfiles from a given Node and build a ast.TaskRC from them.

func NewReader

func NewReader(opts ...ReaderOption) *Reader

NewReader constructs a new Taskfile Reader using the given Node and options.

func (*Reader) Options

func (r *Reader) Options(opts ...ReaderOption)

Options loops through the given ReaderOption functions and applies them to the Reader.

func (*Reader) Read

func (r *Reader) Read(node *Node) (*ast.TaskRC, error)

Read will read the Task config defined by the Reader's Node.

type ReaderOption

type ReaderOption interface {
	ApplyToReader(*Reader)
}

A ReaderOption is any type that can apply a configuration to a Reader.

func WithDebugFunc

func WithDebugFunc(debugFunc DebugFunc) ReaderOption

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL