updated and tested till end of lesson 4

This commit is contained in:
2026-10-11 15:00:58 +03:30
parent d73090946b
commit 2d639d78eb
18 changed files with 1120 additions and 187 deletions
+18
View File
@@ -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())
}