PKGBUILD/cmd/humidity/get.go

29 lines
578 B
Go
Raw Normal View History

2018-12-04 18:11:50 +00:00
package humidity
import (
"log"
"github.com/spf13/cobra"
2019-05-12 09:57:53 +00:00
"github.com/volker-raschek/flucky/pkg/humidity"
2018-12-04 18:11:50 +00:00
)
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")
}