Golang format clean up
Changes made by 'make fmt'.
This commit is contained in:
parent
ae6c886364
commit
c3c8f0d6f8
@ -100,7 +100,7 @@ func printClusters(all bool) {
|
|||||||
table.SetAlignment(tablewriter.ALIGN_CENTER)
|
table.SetAlignment(tablewriter.ALIGN_CENTER)
|
||||||
table.SetHeader([]string{"NAME", "IMAGE", "STATUS", "WORKERS"})
|
table.SetHeader([]string{"NAME", "IMAGE", "STATUS", "WORKERS"})
|
||||||
|
|
||||||
tableEmpty := true;
|
tableEmpty := true
|
||||||
|
|
||||||
for _, cluster := range clusters {
|
for _, cluster := range clusters {
|
||||||
workersRunning := 0
|
workersRunning := 0
|
||||||
@ -123,7 +123,7 @@ func printClusters(all bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Classify cluster state: Running, Stopped or Abnormal
|
// 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
|
// The cluster is in the abnromal state when server state and the worker
|
||||||
// states don't agree.
|
// states don't agree.
|
||||||
for _, w := range workers {
|
for _, w := range workers {
|
||||||
@ -133,12 +133,11 @@ func getClusterStatus(server types.Container, workers []types.Container) (string
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch server.State {
|
switch server.State {
|
||||||
case "exited": // All containers in this state are most likely
|
case "exited": // All containers in this state are most likely
|
||||||
// as the result of running the "k3d stop" command.
|
// as the result of running the "k3d stop" command.
|
||||||
return "stopped"
|
return "stopped"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return server.State
|
return server.State
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@ const defaultNodes = "server"
|
|||||||
|
|
||||||
// mapping a node role to groups that should be applied to it
|
// mapping a node role to groups that should be applied to it
|
||||||
var nodeRuleGroupsMap = map[string][]string{
|
var nodeRuleGroupsMap = map[string][]string{
|
||||||
"worker": []string{"all", "workers"},
|
"worker": {"all", "workers"},
|
||||||
"server": []string{"all", "server", "master"},
|
"server": {"all", "server", "master"},
|
||||||
}
|
}
|
||||||
|
|
||||||
// mapNodesToPortSpecs maps nodes to portSpecs
|
// mapNodesToPortSpecs maps nodes to portSpecs
|
||||||
|
6
main.go
6
main.go
@ -23,15 +23,15 @@ func main() {
|
|||||||
app.Usage = "Run k3s in Docker!"
|
app.Usage = "Run k3s in Docker!"
|
||||||
app.Version = version.GetVersion()
|
app.Version = version.GetVersion()
|
||||||
app.Authors = []cli.Author{
|
app.Authors = []cli.Author{
|
||||||
cli.Author{
|
{
|
||||||
Name: "Thorsten Klein",
|
Name: "Thorsten Klein",
|
||||||
Email: "iwilltry42@gmail.com",
|
Email: "iwilltry42@gmail.com",
|
||||||
},
|
},
|
||||||
cli.Author{
|
{
|
||||||
Name: "Rishabh Gupta",
|
Name: "Rishabh Gupta",
|
||||||
Email: "r.g.gupta@outlook.com",
|
Email: "r.g.gupta@outlook.com",
|
||||||
},
|
},
|
||||||
cli.Author{
|
{
|
||||||
Name: "Darren Shepherd",
|
Name: "Darren Shepherd",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user