updated and tested till end of lesson 4
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"example.com/mqtt5-learning/internal/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cfg, err := config.Load(os.Args[1:])
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
log.Printf("client_id=%s device_id=%s username=%s timeout=%s password=[redacted]",
|
||||
cfg.MQTT.ClientID, cfg.MQTT.DeviceID, cfg.MQTT.Username, cfg.ConnectTimeout())
|
||||
}
|
||||
Reference in New Issue
Block a user