diff --git a/cli/config.go b/cli/config.go index 180b45d9..884faa55 100644 --- a/cli/config.go +++ b/cli/config.go @@ -100,7 +100,7 @@ func printClusters(all bool) { table.SetAlignment(tablewriter.ALIGN_CENTER) table.SetHeader([]string{"NAME", "IMAGE", "STATUS", "WORKERS"}) - tableEmpty := true; + tableEmpty := true for _, cluster := range clusters { workersRunning := 0 @@ -123,7 +123,7 @@ func printClusters(all bool) { } // Classify cluster state: Running, Stopped or Abnormal -func getClusterStatus(server types.Container, workers []types.Container) (string) { +func getClusterStatus(server types.Container, workers []types.Container) string { // The cluster is in the abnromal state when server state and the worker // states don't agree. for _, w := range workers { @@ -133,12 +133,11 @@ func getClusterStatus(server types.Container, workers []types.Container) (string } switch server.State { - case "exited": // All containers in this state are most likely - // as the result of running the "k3d stop" command. + case "exited": // All containers in this state are most likely + // as the result of running the "k3d stop" command. return "stopped" } - return server.State } diff --git a/cli/port.go b/cli/port.go index 544dc67f..6069ad31 100644 --- a/cli/port.go +++ b/cli/port.go @@ -19,8 +19,8 @@ const defaultNodes = "server" // mapping a node role to groups that should be applied to it var nodeRuleGroupsMap = map[string][]string{ - "worker": []string{"all", "workers"}, - "server": []string{"all", "server", "master"}, + "worker": {"all", "workers"}, + "server": {"all", "server", "master"}, } // mapNodesToPortSpecs maps nodes to portSpecs diff --git a/main.go b/main.go index a703d5b0..90f6d30b 100644 --- a/main.go +++ b/main.go @@ -23,15 +23,15 @@ func main() { app.Usage = "Run k3s in Docker!" app.Version = version.GetVersion() app.Authors = []cli.Author{ - cli.Author{ + { Name: "Thorsten Klein", Email: "iwilltry42@gmail.com", }, - cli.Author{ + { Name: "Rishabh Gupta", Email: "r.g.gupta@outlook.com", }, - cli.Author{ + { Name: "Darren Shepherd", }, }