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") }