From 8edfc6e7c5bfd2701898184e88aa343d20aa2465 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 4 Mar 2020 16:51:53 +0100 Subject: [PATCH] Delete docker.go Was not used or implemented --- cmd/cmd.go | 2 +- cmd/docker.go | 32 -------------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 cmd/docker.go diff --git a/cmd/cmd.go b/cmd/cmd.go index b70b43e..d7d167f 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -34,7 +34,7 @@ func NewCleanupCommand(build Build) *cobra.Command { cmds.PersistentFlags().StringVarP(&o.LogLevel, "verbosity", "v", "info", "Log level to use") - cmds.AddCommand(NewTagsCommand()) + cmds.AddCommand( cmds.AddCommand(NewImageStreamCleanupCommand()) return cmds diff --git a/cmd/docker.go b/cmd/docker.go deleted file mode 100644 index 19bf090..0000000 --- a/cmd/docker.go +++ /dev/null @@ -1,32 +0,0 @@ -package cmd - -import ( - "github.com/appuio/image-cleanup/pkg/docker" - "github.com/spf13/cobra" - - log "github.com/sirupsen/logrus" -) - -// NewTagsCommand creates a cobra command to print the tags of a docker image -func NewTagsCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "tags", - Short: "Print the available tags", - Long: `Print the available tags for a Docker image`, - Args: cobra.ExactValidArgs(1), - Run: printImageTags, - } - - return cmd -} - -func printImageTags(cmd *cobra.Command, args []string) { - image := args[0] - - imageTags, err := docker.GetImageTags(image) - if err != nil { - log.WithError(err).WithField("image", image).Fatal("Retrieving image tags failed.") - } - - log.Println(imageTags) -}