MCPcopy Index your code
hub / github.com/databus23/helm-diff / AddDiffOptions

Function AddDiffOptions

cmd/options.go:10–20  ·  view source on GitHub ↗

AddDiffOptions adds flags for the various consolidated options to the functions in the diff package

(f *pflag.FlagSet, o *diff.Options)

Source from the content-addressed store, hash-verified

8
9// AddDiffOptions adds flags for the various consolidated options to the functions in the diff package
10func AddDiffOptions(f *pflag.FlagSet, o *diff.Options) {
11 f.BoolP("suppress-secrets", "q", false, "suppress secrets in the output")
12 f.BoolVar(&o.ShowSecrets, "show-secrets", false, "do not redact secret values in the output")
13 f.BoolVar(&o.ShowSecretsDecoded, "show-secrets-decoded", false, "decode secret values in the output")
14 f.StringArrayVar(&o.SuppressedKinds, "suppress", []string{}, "allows suppression of the kinds listed in the diff output (can specify multiple, like '--suppress Deployment --suppress Service')")
15 f.IntVarP(&o.OutputContext, "context", "C", -1, "output NUM lines of context around changes")
16 f.StringVar(&o.OutputFormat, "output", "diff", "Possible values: diff, simple, template, json, structured, dyff. When set to \"template\", use the env var HELM_DIFF_TPL to specify the template.")
17 f.BoolVar(&o.StripTrailingCR, "strip-trailing-cr", false, "strip trailing carriage return on input")
18 f.Float32VarP(&o.FindRenames, "find-renames", "D", 0, "Enable rename detection if set to any value greater than 0. If specified, the value denotes the maximum fraction of changed content as lines added + removed compared to total lines in a diff for considering it a rename. Only objects of the same Kind are attempted to be matched")
19 f.StringArrayVar(&o.SuppressedOutputLineRegex, "suppress-output-line-regex", []string{}, "a regex to suppress diff output lines that match")
20}
21
22// ProcessDiffOptions processes the set flags and handles possible interactions between them
23func ProcessDiffOptions(f *pflag.FlagSet, o *diff.Options) {

Callers 5

releaseCmdFunction · 0.85
localCmdFunction · 0.85
revisionCmdFunction · 0.85
newChartCommandFunction · 0.85
rollbackCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected