feat(daemon): new flag to set compression
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var compression bool
|
||||
var configPath string
|
||||
|
||||
var daemonCmd = &cobra.Command{
|
||||
@ -20,7 +21,7 @@ var daemonCmd = &cobra.Command{
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
err = daemon.Start(cnf)
|
||||
err = daemon.Start(cnf, compression)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -30,7 +31,7 @@ var daemonCmd = &cobra.Command{
|
||||
|
||||
func InitCmd(cmd *cobra.Command, cnfPath string) {
|
||||
configPath = cnfPath
|
||||
|
||||
cmd.AddCommand(daemonCmd)
|
||||
daemonCmd.Flags().BoolVarP(&compression, "compression", "c", true, "Compress measured values")
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user