29 lines
506 B
Go
29 lines
506 B
Go
package remote
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
"git.cryptic.systems/fh-trier/go-flucky/pkg/remote"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var quiet bool
|
|
|
|
var listRemoteCmd = &cobra.Command{
|
|
Use: "list",
|
|
Short: "List Remove Servers",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
if err := remote.Print(os.Stdout, configDir, quiet); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
remoteCmd.AddCommand(listRemoteCmd)
|
|
|
|
listRemoteCmd.Flags().BoolVarP(&quiet, "quiet", "q", false, "List only sensor id's")
|
|
}
|