PKGBUILD/cmd/temperature/temperature.go

33 lines
600 B
Go

package temperature
import (
"fmt"
"github.com/Masterminds/semver"
"github.com/spf13/cobra"
)
var (
compression bool
configFile *string
logs bool
round float64
version *semver.Version
)
var temperatureCmd = &cobra.Command{
Use: "temperature",
Short: "Operates with temperature values",
Example: fmt.Sprintf("flucky temperature read\nflucky temperature read outdoor"),
}
// InitCmd initialize the subcommand
func InitCmd(cmd *cobra.Command, cnfFile *string, sversion *semver.Version) {
configFile = cnfFile
version = sversion
cmd.AddCommand(temperatureCmd)
}