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

37 lines
592 B

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