parser

package
v0.0.0-...-7ddcf4a Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteDefault

func WriteDefault(path string) error

Types

type RugFile

type RugFile struct {
	// Run pre/post hooks
	Hooks bool `json:"hooks"`
	// A map of environment variables
	Env map[string]string `json:"env,omitempty"`
	// paths to add to $PATH before running
	Path []string `json:"path,omitempty"`
	// List of scripts
	Scripts map[string]string `json:"scripts"`
}

Struct representing a rug file (rug.json)

func DefaultRug

func DefaultRug() RugFile

Default rugfile values

func ReadRugFile

func ReadRugFile(path string) (RugFile, error)

Read a rug file from a specified path

func (*RugFile) GetEnv

func (r *RugFile) GetEnv() []string

func (*RugFile) GetScript

func (r *RugFile) GetScript(name string) string

func (*RugFile) HasScript

func (r *RugFile) HasScript(name string) bool

Jump to

Keyboard shortcuts

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