2018-11-20 21:55:06 +00:00
|
|
|
package temperature
|
2018-11-07 19:07:15 +00:00
|
|
|
|
|
|
|
import (
|
2019-02-24 21:46:36 +00:00
|
|
|
"fmt"
|
|
|
|
|
2019-09-01 10:27:06 +00:00
|
|
|
"github.com/Masterminds/semver"
|
2018-11-07 19:07:15 +00:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
2019-09-01 10:27:06 +00:00
|
|
|
var (
|
|
|
|
compression bool
|
|
|
|
configFile *string
|
2019-12-07 17:57:41 +00:00
|
|
|
logs bool
|
2019-09-01 10:27:06 +00:00
|
|
|
round float64
|
|
|
|
|
|
|
|
version *semver.Version
|
|
|
|
)
|
2018-11-20 21:55:06 +00:00
|
|
|
|
2018-11-07 19:07:15 +00:00
|
|
|
var temperatureCmd = &cobra.Command{
|
2019-02-24 21:46:36 +00:00
|
|
|
Use: "temperature",
|
2019-07-02 20:54:58 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2019-12-07 17:57:41 +00:00
|
|
|
// InitCmd initialize the subcommand
|
2020-01-11 16:24:34 +00:00
|
|
|
func InitCmd(cmd *cobra.Command, cnfFile *string) {
|
2019-06-16 11:00:50 +00:00
|
|
|
configFile = cnfFile
|
2019-09-01 10:27:06 +00:00
|
|
|
|
2018-11-07 19:07:15 +00:00
|
|
|
cmd.AddCommand(temperatureCmd)
|
|
|
|
|
|
|
|
}
|