Last active
April 6, 2022 20:44
-
-
Save rustyeddy/6007c0073146f08d9d905b882bb6ef8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"log" | |
) | |
type Configuration struct { | |
Broker string `json:"broker"` | |
Addr string `json:"Addr" | |
} | |
var ( | |
config Configuration | |
) | |
func init() { | |
flag.StringVar(&config.Broker, "broker", "tcp://localhost:1883", "Address of MQTT broker") | |
flag.BoolVar(&config.Debug, "debug", false, "Start debugging") | |
flag.BoolVar(&config.DebugMQTT, "debug-mqtt", false, "Debugging MQTT messages") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment