1
0
mirror of https://github.com/inexio/thola.git synced 2026-10-25 15:19:17 +03:00
Files
thola/cmd/read_ups.go
mikameyer 747239d114 rename core => internal
mikrotik bugfix
2021-06-09 15:08:20 +02:00

24 lines
519 B
Go

package cmd
import (
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)
func init() {
addDeviceFlags(readUPSCMD)
readCMD.AddCommand(readUPSCMD)
}
var readUPSCMD = &cobra.Command{
Use: "ups",
Short: "Read out UPS information of a device",
Long: "Read out UPS information of a device like battery capacity and current usage.",
Run: func(cmd *cobra.Command, args []string) {
request := request.ReadUPSRequest{
ReadRequest: getReadRequest(args[0]),
}
handleRequest(&request)
},
}