package humidity import ( "log" "github.com/spf13/cobra" "github.com/volker-raschek/flucky/pkg/humidity" ) var follow, push bool var getHumidityCmd = &cobra.Command{ Use: "get", Short: "get humidity from sensor", Run: func(cmd *cobra.Command, args []string) { if err := humidity.Get(); err != nil { log.Fatal(err) } }, } func init() { humidityCmd.AddCommand(getHumidityCmd) // getTemperatureCmd.Flags().BoolVarP(&follow, "follow", "f", false, "Follow output") // getTemperatureCmd.Flags().BoolVarP(&push, "push", "p", false, "Push to remote server") }