25 lines
496 B
Go
25 lines
496 B
Go
package temperature
|
|
|
|
import (
|
|
"log"
|
|
|
|
temperatureSensor "git.cryptic.systems/fh-trier/go-flucky/pkg/sensor/temperature"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var rmTemperatureSensorCmd = &cobra.Command{
|
|
Use: "rm",
|
|
Short: "Remove Temperature Sensor",
|
|
Args: cobra.ExactArgs(1),
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
if err := temperatureSensor.Remove(args[0], configDir); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
temperatureSensorCmd.AddCommand(rmTemperatureSensorCmd)
|
|
}
|