refactor(cli): Move cmdflags package under pkg/cli/client (#1840)

Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
Alexei Dodon
2023-09-22 16:33:18 +03:00
committed by GitHub
parent 8c559441e6
commit 4e04be420e
18 changed files with 447 additions and 450 deletions
+3 -5
View File
@@ -7,12 +7,10 @@ import (
"fmt"
"github.com/spf13/cobra"
"zotregistry.io/zot/pkg/cli/cmdflags"
)
func NewListReposCommand(searchService SearchService) *cobra.Command {
repoListSortFlag := cmdflags.RepoListSortFlag(cmdflags.SortByAlphabeticAsc)
repoListSortFlag := RepoListSortFlag(SortByAlphabeticAsc)
cmd := &cobra.Command{
Use: "list",
@@ -29,8 +27,8 @@ func NewListReposCommand(searchService SearchService) *cobra.Command {
},
}
cmd.Flags().Var(&repoListSortFlag, cmdflags.SortByFlag,
fmt.Sprintf("Options for sorting the output: [%s]", cmdflags.RepoListSortOptionsStr()))
cmd.Flags().Var(&repoListSortFlag, SortByFlag,
fmt.Sprintf("Options for sorting the output: [%s]", RepoListSortOptionsStr()))
return cmd
}