diff --git a/pkg/cli/templatecmd/ls.go b/pkg/cli/templatecmd/ls.go new file mode 100644 index 0000000..616649d --- /dev/null +++ b/pkg/cli/templatecmd/ls.go @@ -0,0 +1,23 @@ +package templatecmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +var templates = []string{"docker", "gobin_default"} + +func NewLsCmd() *cobra.Command { + return &cobra.Command{ + Use: "ls", + RunE: func(cmd *cobra.Command, args []string) error { + + for _, t := range templates { + fmt.Printf("%s\n", t) + } + + return nil + }, + } +} diff --git a/pkg/cli/templatecmd/template.go b/pkg/cli/templatecmd/template.go index dc6e0dc..8b06ca4 100644 --- a/pkg/cli/templatecmd/template.go +++ b/pkg/cli/templatecmd/template.go @@ -7,7 +7,10 @@ func NewTemplateCmd() *cobra.Command { Use: "template", } - cmd.AddCommand(NewInitCmd()) + cmd.AddCommand( + NewInitCmd(), + NewLsCmd(), + ) return cmd }