PKGBUILD/cmd/sensor/disable.go
2018-11-28 18:07:20 +01:00

25 lines
422 B
Go

package sensor
import (
"log"
"git.cryptic.systems/fh-trier/go-flucky/pkg/sensor"
"github.com/spf13/cobra"
)
var disableSensorCmd = &cobra.Command{
Use: "disable",
Short: "Disable Sensor",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
if err := sensor.Disable(args[0], configDir); err != nil {
log.Fatal(err)
}
},
}
func init() {
sensorCmd.AddCommand(disableSensorCmd)
}