PKGBUILD/cmd/temperature/temperature.go

26 lines
417 B
Go
Raw Normal View History

2018-11-07 19:07:15 +00:00
package temperature
import (
"log"
"os"
"git.cryptic.systems/fh-trier/go-flucky/pkg/temperature"
"github.com/spf13/cobra"
)
var temperatureCmd = &cobra.Command{
Use: "temperature",
Short: "temperature",
Run: func(cmd *cobra.Command, args []string) {
if err := temperature.Print(os.Stdout); err != nil {
log.Fatal(err)
}
},
}
func InitCmd(cmd *cobra.Command) {
cmd.AddCommand(temperatureCmd)
}