PKGBUILD/cmd/temperature/temperature.go

33 lines
600 B
Go
Raw Normal View History

package temperature
2018-11-07 19:07:15 +00:00
import (
2019-02-24 21:46:36 +00:00
"fmt"
"github.com/Masterminds/semver"
2018-11-07 19:07:15 +00:00
"github.com/spf13/cobra"
)
var (
compression bool
configFile *string
logs bool
round float64
version *semver.Version
)
2018-11-07 19:07:15 +00:00
var temperatureCmd = &cobra.Command{
2019-02-24 21:46:36 +00:00
Use: "temperature",
Short: "Operates with temperature values",
2019-02-24 21:46:36 +00:00
Example: fmt.Sprintf("flucky temperature read\nflucky temperature read outdoor"),
2018-11-07 19:07:15 +00:00
}
// InitCmd initialize the subcommand
func InitCmd(cmd *cobra.Command, cnfFile *string, sversion *semver.Version) {
configFile = cnfFile
version = sversion
2018-11-07 19:07:15 +00:00
cmd.AddCommand(temperatureCmd)
}