Golang format clean up

Changes made by 'make fmt'.
pull/49/head
Andy Zhou 5 years ago
parent ae6c886364
commit c3c8f0d6f8
  1. 9
      cli/config.go
  2. 4
      cli/port.go
  3. 6
      main.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
}

@ -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

@ -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",
},
}

Loading…
Cancel
Save