You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gridscale-check/servers_list.go

36 lines
549 B

// Copyright 2018 Felix Kronlage <fkr@hazardous.org>
package main
import (
"fmt"
)
type ListServersCommand struct {
}
var listServersCommand ListServersCommand
func (x *ListServersCommand) Execute(args []string) error {
config(Checker.ConfigFile)
servers, error := Config.Client.GetServerList()
if error != nil {
Unknown(fmt.Sprintf("Error while retrieving servers: %s", error))
}
for key, server := range servers {
fmt.Printf("%s: %+v\n\n", key, server.Properties)
}
Ok((""))
// never reached
return nil
}
func init() {
}