mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-03-14 14:16:16 +01:00
* 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
23 lines
542 B
Go
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
|
|
}
|