fix(cmd): configPath variable
This commit is contained in:
@ -4,18 +4,23 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var configDir string
|
||||
var configPath string
|
||||
|
||||
var daemonCmd = &cobra.Command{
|
||||
Use: "daemon",
|
||||
Short: "Read continuously data from all enabled sensors",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
// read configuration
|
||||
// cnf, err := config.Read(configPath)
|
||||
// if err != nil {
|
||||
// log.Fatalln(err)
|
||||
// }
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
func InitCmd(cmd *cobra.Command, cnf string) {
|
||||
configDir = cnf
|
||||
func InitCmd(cmd *cobra.Command, cnfPath string) {
|
||||
configPath = cnfPath
|
||||
|
||||
cmd.AddCommand(daemonCmd)
|
||||
|
||||
|
Reference in New Issue
Block a user