2018-11-20 21:55:06 +00:00
|
|
|
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",
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
|
2018-11-29 19:03:42 +00:00
|
|
|
if err := temperature.Push(configDir); err != nil {
|
2018-11-20 21:55:06 +00:00
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
temperatureCmd.AddCommand(pushTemperatureCmd)
|
|
|
|
}
|