PKGBUILD/cmd/temperature/push.go
Markus Pesch 6d9368e86c
fix: temperature, sensor
changes:
- sensor temperature add
- sensor temperature list
- sensor temperature rm
- temperature get
- temperature log
- temperature push
2018-11-21 19:30:14 +01:00

25 lines
472 B
Go

package temperature
import (
"log"
"git.cryptic.systems/fh-trier/go-flucky/pkg/temperature"
"github.com/spf13/cobra"
)
var pushTemperatureCmd = &cobra.Command{
Use: "push",
Short: "push temperature from sensor to remote servers",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
if err := temperature.Push(args[0], configDir); err != nil {
log.Fatal(err)
}
},
}
func init() {
temperatureCmd.AddCommand(pushTemperatureCmd)
}