mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-03-15 02:39:13 +01:00
24 lines
542 B
Go
24 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
|
||
|
}
|