From 1edff18ad41f6fc369091acf93cab95c81071f1f Mon Sep 17 00:00:00 2001 From: vilmibm Date: Mon, 14 Sep 2020 10:38:35 -0500 Subject: [PATCH] s/private/secret --- pkg/cmd/gist/list/http.go | 2 +- pkg/cmd/gist/list/list.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/cmd/gist/list/http.go b/pkg/cmd/gist/list/http.go index 9c462f456..abc497423 100644 --- a/pkg/cmd/gist/list/http.go +++ b/pkg/cmd/gist/list/http.go @@ -32,7 +32,7 @@ func listGists(client *http.Client, hostname string, limit int, visibility strin if len(gists) == limit { break } - if visibility == "all" || (visibility == "private" && !gist.Public) || (visibility == "public" && gist.Public) { + if visibility == "all" || (visibility == "secret" && !gist.Public) || (visibility == "public" && gist.Public) { gists = append(gists, gist) } } diff --git a/pkg/cmd/gist/list/list.go b/pkg/cmd/gist/list/list.go index 8aba36fc4..1febf5c41 100644 --- a/pkg/cmd/gist/list/list.go +++ b/pkg/cmd/gist/list/list.go @@ -36,13 +36,13 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman } pub := cmd.Flags().Changed("public") - priv := cmd.Flags().Changed("private") + secret := cmd.Flags().Changed("secret") opts.Visibility = "all" - if pub && !priv { + if pub && !secret { opts.Visibility = "public" - } else if priv && !pub { - opts.Visibility = "private" + } else if secret && !pub { + opts.Visibility = "secret" } if runF != nil { @@ -55,7 +55,7 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman cmd.Flags().IntVarP(&opts.Limit, "limit", "L", 10, "Maximum number of gists to fetch") cmd.Flags().Bool("public", false, "Show only public gists") - cmd.Flags().Bool("private", false, "Show only private gists") + cmd.Flags().Bool("secret", false, "Show only secret gists") return cmd }