package humidity import ( "github.com/spf13/cobra" ) var configPath string var humidityCmd = &cobra.Command{ Use: "humidity", Short: "Read humidity from sensor", } // Execute a func InitCmd(cmd *cobra.Command, cnfPath string) { configPath = cnfPath cmd.AddCommand(humidityCmd) }