parser

package
v0.0.49 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CMD             = "cmd"
	DESCRIPTION     = "description"
	WORKDIR         = "work_dir"
	SHELL           = "shell"
	ENV             = "env"
	EvalEnv         = "eval_env"
	OPTIONS         = "options"
	DEPENDS         = "depends"
	CHECKSUM        = "checksum"
	PersistChecksum = "persist_checksum"
	AFTER           = "after"
	REF             = "ref"
	ARGS            = "args"
)

Functions

func OptsToLetsCli

func OptsToLetsCli(opts docopt.Opts) map[string]string

func OptsToLetsOpt

func OptsToLetsOpt(opts docopt.Opts) map[string]string

func Parse

func Parse(data []byte, cfg *config.Config) error

Parse file data into config.

func ParseDocopts

func ParseDocopts(args []string, docopts string) (docopt.Opts, error)

ParseDocopts parses docopts for command options with args from os.Args.

func ParseDocoptsOptions added in v0.0.46

func ParseDocoptsOptions(docopts string, cmdName string) ([]docopt.Option, error)

ParseDocoptsOptions parses docopts only to get all available options for a command.

Types

type ConfigParseError

type ConfigParseError struct {
	Path struct {
		Full  string
		Field string
	}
	Err error
}

func (*ConfigParseError) Error

func (e *ConfigParseError) Error() string

type EnvChecksum

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

func (EnvChecksum) Name

func (entry EnvChecksum) Name() string

func (EnvChecksum) Value

func (entry EnvChecksum) Value() (string, error)

type EnvEntry

type EnvEntry interface {
	Value() (string, error)
	Name() string
}

type EnvSh

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

func (EnvSh) Name

func (entry EnvSh) Name() string

func (EnvSh) Value

func (entry EnvSh) Value() (string, error)

type EnvString

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

func (EnvString) Name

func (entry EnvString) Name() string

func (EnvString) Value

func (entry EnvString) Value() (string, error)

type ParseError

type ParseError struct {
	Directive   string
	CommandName string
	Err         error
}

func (*ParseError) Error

func (e *ParseError) Error() string

type RemoteMixin added in v0.0.49

type RemoteMixin struct {
	URL     string
	Version string
	// contains filtered or unexported fields
}

func (*RemoteMixin) Filename added in v0.0.49

func (rm *RemoteMixin) Filename() string

Filename is name of mixin file (hash from url).

func (*RemoteMixin) Path added in v0.0.49

func (rm *RemoteMixin) Path() string

Path is abs path to mixin file (.lets/mixins/<filename>).

Jump to

Keyboard shortcuts

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