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

31 lines
745 B
Go

package cmd
import (
"git.cryptic.systems/fh-trier/go-flucky/cmd/config"
"git.cryptic.systems/fh-trier/go-flucky/cmd/remote"
"git.cryptic.systems/fh-trier/go-flucky/cmd/sensor"
"git.cryptic.systems/fh-trier/go-flucky/cmd/temperature"
"github.com/spf13/cobra"
)
var configDir string
var rootCmd = &cobra.Command{
Use: "flucky",
Short: "Read from sensors",
}
// Execute a
func Execute(version string) {
rootCmd.Version = version
rootCmd.PersistentFlags().StringVarP(&configDir, "config", "c", "/etc/flucky", "The base directory for all configuration files.")
config.InitCmd(rootCmd, configDir)
remote.InitCmd(rootCmd, configDir)
sensor.InitCmd(rootCmd, configDir)
temperature.InitCmd(rootCmd, configDir)
rootCmd.Execute()
}