Documentation
¶
Overview ¶
Package expander provides an extension for representing expandable expressions in command line arguments. The main use case is for dynamically evaluating these expressions with values that occur during the execution of the evaluators.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrUnknownToken ¶
type ErrUnknownToken string
func (ErrUnknownToken) Error ¶
func (e ErrUnknownToken) Error() string
type Interface ¶
Interface converts the given string key into its variable expansion
func Prefix ¶
Prefix provides an expander which looks for and cuts a given prefix and delegates the result to the underlying expander
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
func CompilePattern ¶
type Renderer ¶
Renderer is a specialized writer that understands writing to multiple files and the corresponding variable support
func NewRenderer ¶
type Syntax ¶
type Syntax int
const ( // SyntaxDefault indicates that the expression syntax uses the // form <name>[':' <format>]. That is, an optional format string is allowed // to control the output. SyntaxDefault Syntax = iota // SyntaxRecursive causes recursive expression evaluation to // be allowed. For example, the expression ${VISUAL:${EDITOR}} // would evaluate both environment variables, falling back to EDITOR. SyntaxRecursive )
func (Syntax) CompilePattern ¶
Click to show internal directories.
Click to hide internal directories.