2018-11-28 17:07:20 +00:00
|
|
|
package sensor
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
|
|
|
|
"git.cryptic.systems/fh-trier/go-flucky/pkg/sensor"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
var rmSensorCmd = &cobra.Command{
|
2018-12-07 21:50:28 +00:00
|
|
|
Use: "rm",
|
|
|
|
Short: "Remove Sensor",
|
|
|
|
Aliases: []string{"remove"},
|
|
|
|
Args: cobra.ExactArgs(1),
|
2018-11-28 17:07:20 +00:00
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
if err := sensor.Remove(args[0], configDir); err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
sensorCmd.AddCommand(rmSensorCmd)
|
|
|
|
}
|