parser

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: MIT Imports: 14 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"
)
View Source
var DocoptParser = &docopt.Parser{
	HelpHandler:   docopt.NoHelpHandler,
	OptionsFirst:  false,
	SkipHelpFlags: false,
}

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.

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

Jump to

Keyboard shortcuts

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