mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
112fbec5b6
- image command is now deprecated in favor of 'images' - cve command is now deprecated in favor of 'cves' Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
25 lines
509 B
Go
25 lines
509 B
Go
//go:build search
|
|
// +build search
|
|
|
|
package cli
|
|
|
|
import "github.com/spf13/cobra"
|
|
|
|
func NewListReposCommand(searchService SearchService) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "list",
|
|
Short: "List all repositories",
|
|
Long: "List all repositories",
|
|
Args: cobra.NoArgs,
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
searchConfig, err := GetSearchConfigFromFlags(cmd, searchService)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return SearchRepos(searchConfig)
|
|
},
|
|
}
|
|
|
|
return cmd
|
|
}
|