Documentation
¶
Overview ¶
Package flags provides Terragrunt command flags.
Index ¶
- Constants
- func EnvVars(names ...string) []string
- func EnvVarsWithPrefix(prefix string, names ...string) []string
- func FlagNames(prefix string, names ...string) []string
- func HelpAction(ctx *cli.Context, opts *options.TerragruntOptions) error
- func NewGlobalFlags(opts *options.TerragruntOptions) cli.Flags
- func NewHelpVersionFlags(opts *options.TerragruntOptions) cli.Flags
- func NewLogLevelFlag(opts *options.TerragruntOptions) cli.Flag
- func VersionAction(ctx *cli.Context, _ *options.TerragruntOptions) error
- type Flag
- func BoolWithDeprecatedFlag(opts *options.TerragruntOptions, flag *cli.BoolFlag, oldNames ...string) *Flag
- func GenericWithDeprecatedFlag[T cli.GenericType](opts *options.TerragruntOptions, flag *cli.GenericFlag[T], oldNames ...string) *Flag
- func MapWithDeprecatedFlag[K cli.MapFlagKeyType, V cli.MapFlagValueType](opts *options.TerragruntOptions, flag *cli.MapFlag[K, V], oldNames ...string) *Flag
- func SliceWithDeprecatedFlag[T cli.SliceFlagType](opts *options.TerragruntOptions, flag *cli.SliceFlag[T], oldNames ...string) *Flag
Constants ¶
const ( DeprecatedEnvVarPrefix = "TERRAGRUNT_" DeprecatedFlagNamePrefix = "terragrunt-" )
const ( LogLevelFlagName = "log-level" LogDisableFlagName = "log-disable" ShowLogAbsPathsFlagName = "log-show-abs-paths" LogFormatFlagName = "log-format" LogCustomFormatFlagName = "log-custom-format" NoColorFlagName = "no-color" NonInteractiveFlagName = "non-interactive" WorkingDirFlagName = "working-dir" StrictModeFlagName = "strict-mode" StrictControlFlagName = "strict-control" ExperimentModeFlagName = "experiment-mode" ExperimentFlagName = "experiment" HelpFlagName = "help" VersionFlagName = "version" TerragruntDisableLogFormattingFlagName = DeprecatedFlagNamePrefix + "disable-log-formatting" TerragruntJSONLogFlagName = DeprecatedFlagNamePrefix + "json-log" )
const EnvVarPrefix = "TG_"
Variables ¶
This section is empty.
Functions ¶
func EnvVarsWithPrefix ¶
EnvVarsWithPrefix converts the given flag names into their corresponding environment variables, with a given `prefix` added.
func HelpAction ¶
func HelpAction(ctx *cli.Context, opts *options.TerragruntOptions) error
func NewGlobalFlags ¶
func NewGlobalFlags(opts *options.TerragruntOptions) cli.Flags
NewGlobalFlags creates and returns flags common to all commands.
func NewHelpVersionFlags ¶
func NewHelpVersionFlags(opts *options.TerragruntOptions) cli.Flags
func NewLogLevelFlag ¶
func NewLogLevelFlag(opts *options.TerragruntOptions) cli.Flag
func VersionAction ¶
func VersionAction(ctx *cli.Context, _ *options.TerragruntOptions) error
Types ¶
type Flag ¶
Flag is a wrapper for `cli.Flag` to avoid displaying deprecated names in help.
func BoolWithDeprecatedFlag ¶
func BoolWithDeprecatedFlag(opts *options.TerragruntOptions, flag *cli.BoolFlag, oldNames ...string) *Flag
BoolWithDeprecatedFlag adds deprecated names with strict mode control for the given flag. If `oldNames` is not specified, names are derived from the given `flag` value with added `terragrunt-/TERRAGRUNT_` prefixes.
func GenericWithDeprecatedFlag ¶
func GenericWithDeprecatedFlag[T cli.GenericType](opts *options.TerragruntOptions, flag *cli.GenericFlag[T], oldNames ...string) *Flag
GenericWithDeprecatedFlag adds deprecated names with strict mode control for the given flag. If `oldNames` is not specified, names are derived from the given `flag` value with added `terragrunt-/TERRAGRUNT_` prefixes.
func MapWithDeprecatedFlag ¶
func MapWithDeprecatedFlag[K cli.MapFlagKeyType, V cli.MapFlagValueType](opts *options.TerragruntOptions, flag *cli.MapFlag[K, V], oldNames ...string) *Flag
MapWithDeprecatedFlag adds deprecated names with strict mode control for the given flag. If `oldNames` is not specified, names are derived from the given `flag` value with added `terragrunt-/TERRAGRUNT_` prefixes.
func SliceWithDeprecatedFlag ¶
func SliceWithDeprecatedFlag[T cli.SliceFlagType](opts *options.TerragruntOptions, flag *cli.SliceFlag[T], oldNames ...string) *Flag
SliceWithDeprecatedFlag adds deprecated names with strict mode control for the given flag. If `oldNames` is not specified, names are derived from the given `flag` value with added `terragrunt-/TERRAGRUNT_` prefixes.
func (*Flag) GetEnvVars ¶
GetEnvVars returns flag envs without deprecated renamedNames to avoid showing them in help.
func (*Flag) Names ¶
Names returns flag renamedNames without deprecated renamedNames to avoid showing them in help.