mirror of
https://github.com/inexio/thola.git
synced 2026-10-24 03:08:55 +03:00
29 lines
618 B
Go
29 lines
618 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/inexio/thola/internal/request"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
rootCMD.AddCommand(readCMD)
|
|
}
|
|
|
|
var readCMD = &cobra.Command{
|
|
Use: "read",
|
|
Short: "Read out information of a device",
|
|
Long: "Read out information of a device.\n\n" +
|
|
"You need to specify the information which you want to read out with a subcommand.",
|
|
DisableFlagsInUseLine: true,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Println(cmd.UsageString())
|
|
},
|
|
}
|
|
|
|
func getReadRequest(host string) request.ReadRequest {
|
|
return request.ReadRequest{
|
|
BaseRequest: getBaseRequest(host),
|
|
}
|
|
}
|