26 lines
444 B
Go
26 lines
444 B
Go
package remote
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
"git.cryptic.systems/fh-trier/go-flucky/pkg/temperature"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var getTemperatureCmd = &cobra.Command{
|
|
Use: "get",
|
|
Short: "get temperature from sensor",
|
|
// Args: cobra.ExactArgs(2),
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
if err := temperature.Get(os.Stdout); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
temperatureCmd.AddCommand(getTemperatureCmd)
|
|
}
|