32 lines
558 B
Go
32 lines
558 B
Go
package temperature
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/Masterminds/semver"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
compression bool
|
|
configFile *string
|
|
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"),
|
|
}
|
|
|
|
// Execute a
|
|
func InitCmd(cmd *cobra.Command, cnfFile *string, sversion *semver.Version) {
|
|
configFile = cnfFile
|
|
version = sversion
|
|
|
|
cmd.AddCommand(temperatureCmd)
|
|
|
|
}
|