chore: clean up for comments

Signed-off-by: Terry Howe <terrylhowe@gmail.com>
pull/31295/head
Terry Howe 1 week ago
parent ef8a06e398
commit 678c336230
No known key found for this signature in database

@ -315,7 +315,7 @@ func (l *List) SetStateMask() {
state |= ListSuperseded state |= ListSuperseded
} }
// Apply a default - now defaults to ListAll instead of just deployed and failed // Apply a default
if state == 0 { if state == 0 {
state = ListAll state = ListAll
} }

@ -174,7 +174,6 @@ func TestList_StateMask(t *testing.T) {
err = lister.cfg.Releases.Update(one) err = lister.cfg.Releases.Update(one)
is.NoError(err) is.NoError(err)
// With the new default (ListAll), we should see all 3 releases by default
res, err := lister.Run() res, err := lister.Run()
is.NoError(err) is.NoError(err)
is.Len(res, 3) is.Len(res, 3)

@ -36,10 +36,10 @@ import (
var listHelp = ` var listHelp = `
This command lists all of the releases for a specified namespace (uses current namespace context if namespace not specified). This command lists all of the releases for a specified namespace (uses current namespace context if namespace not specified).
By default, it lists all releases in any status including deployed, failed, By default, it lists all releases in any status including deployed, failed,
pending-upgrade, pending-install, pending-rollback, uninstalled, uninstalling, pending-upgrade, pending-install, pending-rollback, uninstalled, uninstalling,
superseded, and unknown. Individual status filters like '--deployed', '--failed', superseded, and unknown. Individual status filters like '--deployed', '--failed',
'--pending', '--uninstalled', '--superseded', and '--uninstalling' can be used '--pending', '--uninstalled', '--superseded', and '--uninstalling' can be used
to show only releases in specific states. Such flags can be combined: to show only releases in specific states. Such flags can be combined:
'--deployed --failed'. '--deployed --failed'.
@ -120,12 +120,12 @@ func newListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
f.StringVar(&client.TimeFormat, "time-format", "", `format time using golang time formatter. Example: --time-format "2006-01-02 15:04:05Z0700"`) f.StringVar(&client.TimeFormat, "time-format", "", `format time using golang time formatter. Example: --time-format "2006-01-02 15:04:05Z0700"`)
f.BoolVarP(&client.ByDate, "date", "d", false, "sort by release date") f.BoolVarP(&client.ByDate, "date", "d", false, "sort by release date")
f.BoolVarP(&client.SortReverse, "reverse", "r", false, "reverse the sort order") f.BoolVarP(&client.SortReverse, "reverse", "r", false, "reverse the sort order")
f.BoolVar(&client.Uninstalled, "uninstalled", false, "show only uninstalled releases (if 'helm uninstall --keep-history' was used)") f.BoolVar(&client.Uninstalled, "uninstalled", false, "show uninstalled releases (if 'helm uninstall --keep-history' was used)")
f.BoolVar(&client.Superseded, "superseded", false, "show only superseded releases") f.BoolVar(&client.Superseded, "superseded", false, "show superseded releases")
f.BoolVar(&client.Uninstalling, "uninstalling", false, "show only releases that are currently being uninstalled") f.BoolVar(&client.Uninstalling, "uninstalling", false, "show releases that are currently being uninstalled")
f.BoolVar(&client.Deployed, "deployed", false, "show only deployed releases") f.BoolVar(&client.Deployed, "deployed", false, "show deployed releases")
f.BoolVar(&client.Failed, "failed", false, "show only failed releases") f.BoolVar(&client.Failed, "failed", false, "show failed releases")
f.BoolVar(&client.Pending, "pending", false, "show only pending releases") f.BoolVar(&client.Pending, "pending", false, "show pending releases")
f.BoolVarP(&client.AllNamespaces, "all-namespaces", "A", false, "list releases across all namespaces") f.BoolVarP(&client.AllNamespaces, "all-namespaces", "A", false, "list releases across all namespaces")
f.IntVarP(&client.Limit, "max", "m", 256, "maximum number of releases to fetch") f.IntVarP(&client.Limit, "max", "m", 256, "maximum number of releases to fetch")
f.IntVar(&client.Offset, "offset", 0, "next release index in the list, used to offset from start value") f.IntVar(&client.Offset, "offset", 0, "next release index in the list, used to offset from start value")

Loading…
Cancel
Save