Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfig ¶
GetConfig loads and merges local and global rite configuration files. Filenames are rite-specific (`.riterc.yml`, `$XDG_CONFIG_HOME/rite/riterc.yml`) so rite can coexist with go-task's own `.taskrc.yml` in the same directory or home without either tool stepping on the other's config.
Types ¶
type DebugFunc ¶
type DebugFunc func(string)
DebugFunc is a function that can be called to log debug messages.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
A Reader will recursively read Taskfiles from a given Node and build a ast.Riterc from them.
func NewReader ¶
func NewReader(opts ...ReaderOption) *Reader
NewReader constructs a new Ritefile 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.
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.