Skip to content

Commit

Permalink
Consolidate the default cluster name into as single definition
Browse files Browse the repository at this point in the history
To ensure all reference of the default cluster name are the same.
Not having to check for typos will make it easier to maintain.
  • Loading branch information
andyz-dev committed May 8, 2019
1 parent 15b1326 commit 4ebf342
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

// defaultK3sImage specifies the default image being used for server and workers
const defaultK3sImage = "docker.io/rancher/k3s"
const defaultK3sClusterName string = "k3s-default"

// main represents the CLI application
func main() {
Expand Down Expand Up @@ -52,7 +53,7 @@ func main() {
Flags: []cli.Flag{
cli.StringFlag{
Name: "name, n",
Value: "k3s-default",
Value: defaultK3sClusterName,
Usage: "Set a name for the cluster",
},
cli.StringFlag{
Expand Down Expand Up @@ -107,7 +108,7 @@ func main() {
Flags: []cli.Flag{
cli.StringFlag{
Name: "name, n",
Value: "k3s-default",
Value: defaultK3sClusterName,
Usage: "name of the cluster",
},
cli.BoolFlag{
Expand All @@ -124,7 +125,7 @@ func main() {
Flags: []cli.Flag{
cli.StringFlag{
Name: "name, n",
Value: "k3s-default",
Value: defaultK3sClusterName,
Usage: "Name of the cluster",
},
cli.BoolFlag{
Expand All @@ -141,7 +142,7 @@ func main() {
Flags: []cli.Flag{
cli.StringFlag{
Name: "name, n",
Value: "k3s-default",
Value: defaultK3sClusterName,
Usage: "Name of the cluster",
},
cli.BoolFlag{
Expand Down Expand Up @@ -171,7 +172,7 @@ func main() {
Flags: []cli.Flag{
cli.StringFlag{
Name: "name, n",
Value: "k3s-default",
Value: defaultK3sClusterName,
Usage: "Name of the cluster",
},
cli.BoolFlag{
Expand Down

0 comments on commit 4ebf342

Please sign in to comment.