PKGBUILD/cmd/temperature/logs.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

28 lines
588 B
Go

package temperature
import (
"log"
"os"
"git.cryptic.systems/fh-trier/go-flucky/pkg/temperature"
"github.com/spf13/cobra"
)
//var seconds int32
var logTemperatureCmd = &cobra.Command{
Use: "logs",
Short: "logs print all temperatures from all sensors",
Run: func(cmd *cobra.Command, args []string) {
if err := temperature.Logs(os.Stdout, configDir); err != nil {
log.Fatal(err)
}
},
}
func init() {
temperatureCmd.AddCommand(logTemperatureCmd)
//logTemperatureCmd.Flags().Int32VarP(&seconds, "seconds", "s", 1, "Interval to print new temperatures from sensors")
}