Documentation
¶
Index ¶
- Constants
- Variables
- func BoolCompletion(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective)
- func EnvName(name string) string
- func InitLog(w io.Writer, level slogx.Level, format slogx.Format)
- func WithContext(ctx context.Context, conf *Config) context.Context
- type Config
- type DeprecatedWriter
- type Vars
Constants ¶
View Source
const ( VarFlag = "var" InplaceFlag = "inplace" PrefixFlag = "prefix" LeftDelimFlag = "left-delim" RightDelimFlag = "right-delim" IndentFlag = "indent" StripFlag = "strip" NoSourceCommentFlag = "no-source-comment" IgnoreUnsetErrorsFlag = "ignore-unset-errors" IgnoreTemplateErrorsFlag = "ignore-template-errors" LogLevelFlag = "log-level" LogFormatFlag = "log-format" // Deprecated: Replaced by VarFlag. ValueFlag = "value" // Deprecated: Removed. Yampl will always recurse if a given path is a directory. RecursiveFlag = "recursive" // Deprecated: Replaced by IgnoreUnsetErrorsFlag and IgnoreTemplateErrorsFlag. FailFlag = "fail" )
View Source
const CurrentValueKey = "Value"
Deprecated: Use `current` template function instead.
View Source
const EnvPrefix = "YAMPL_"
Variables ¶
View Source
var ErrCmdMissingConfig = errors.New("config missing from command context")
Functions ¶
func BoolCompletion ¶ added in v0.6.0
Types ¶
type Config ¶
type Config struct { Vars Vars Inplace bool Prefix string LeftDelim string RightDelim string Indent int Strip bool NoSourceComment bool IgnoreUnsetErrors bool IgnoreTemplateErrors bool LogLevel slogx.Level LogFormat slogx.Format Completion string // contains filtered or unexported fields }
func (*Config) RegisterCompletions ¶ added in v0.6.0
func (*Config) RegisterFlags ¶ added in v0.6.0
type DeprecatedWriter ¶ added in v0.6.1
type DeprecatedWriter struct{}
Click to show internal directories.
Click to hide internal directories.