parser

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoTasksHeading = errors.New("no xc block found")

ErrNoTasksHeading is returned if the markdown contains no xc block

Functions

func NewParser

func NewParser(r io.Reader, heading *string) (p parser, err error)

NewParser will read from r until it finds a valid xc heading block. If no block is found an error is returned.

Types

type AttributeType

type AttributeType int

AttributeType represents metadata related to a Task.

# Tasks
## Task1
AttributeName: AttributeValue
```
script
```
const (
	// AttributeTypeEnv sets the environment variables for a Task.
	// It can be represented by an attribute with name `environment` or `env`.
	AttributeTypeEnv AttributeType = iota
	// AttributeTypeDir sets the working directory for a Task.
	// It can be represented by an attribute with name `directory` or `dir`.
	AttributeTypeDir
	// AttributeTypeReq sets the required Tasks for a Task, they will run
	// prior to the execution of the selected task.
	// It can be represented by an attribute with name `requires` or `req`.
	AttributeTypeReq
	// AttributeTypeInp sets the required inputs for a Task, inputs can be provided
	// as commandline arguments or environment variables.
	AttributeTypeInp
	// AttributeTypeRun sets the tasks requiredBehaviour, can be always or once.
	// Default is always
	AttributeTypeRun
	// AttributeTypeRunDeps sets the tasks dependenciesBehaviour, can be sync or async.
	AttributeTypeRunDeps
	// AttributeTypeInteractive indicates if this is an interactive task
	// if it is, then logs are not prefixed and the stdout/stderr are passed directly
	// from the OS
	AttributeTypeInteractive
)

Jump to

Keyboard shortcuts

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