manifest

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Alias    []string `yaml:"alias"`
	Help     string   `yaml:"help"`
	Args     []string `yaml:"args"`
	Deps     []string `yaml:"deps"`
	Exec     string   `yaml:"exec"`
	Include  string   `yaml:"include"`
	Commands Commands `yaml:"commands"`
}

type Commands

type Commands map[string]*Command

func (Commands) Count

func (cs Commands) Count() (n int)

type Manifest

type Manifest struct {
	Version int    `yaml:"version"`
	Project string `yaml:"project"`

	Env         yaml.MapSlice          `yaml:"env"` // Use MapSlice to preserve order.
	Options     map[string]interface{} `yaml:"options"`
	Interpreter string                 `yaml:"interpreter"`
	Import      []string               `yaml:"import"`
	Commands    Commands               `yaml:"commands"`
}

func Parse

func Parse(path string) (m *Manifest, err error)

Parse a grml build file.

func (*Manifest) EvalEnv

func (m *Manifest) EvalEnv(parentEnv map[string]string) (env map[string]string)

func (*Manifest) ParseOptions

func (m *Manifest) ParseOptions() (o *options.Options, err error)

Jump to

Keyboard shortcuts

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