coredns-deployment/kubernetes/corefile-tool/cmd/validversions.go
Sandeep Rajan 37f5d0dad4 Adding CLI for the migration tool (#154)
* Initial commit for the corefile-tool cli for the migration tool

* cleanup implementation

* nit

* add fn to get corefile path

* add released command and improve readme
2019-04-24 11:22:13 -04:00

23 lines
542 B
Go

package cmd
import (
"fmt"
"strings"
"github.com/coredns/deployment/kubernetes/migration"
"github.com/spf13/cobra"
)
// NewValidVersionsCmd represents the validversions command
func NewValidVersionsCmd() *cobra.Command {
validversionsCmd := &cobra.Command{
Use: "validversions",
Short: "Shows valid versions of CoreDNS",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("The following are valid CoreDNS versions:")
fmt.Println(strings.Join(migration.ValidVersions(), ", "))
},
}
return validversionsCmd
}