Update example code to use new NewServer function instead of deprecated New

This commit is contained in:
mochi
2022-03-31 16:49:02 +01:00
parent 18629aea6d
commit 99c96c844e
6 changed files with 6 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ func main() {
fmt.Println(aurora.Magenta("Mochi MQTT Server initializing..."), aurora.Cyan("TCP"))
server := mqtt.New()
server := mqtt.NewServer(nil)
tcp := listeners.NewTCP("t1", ":1883")
err := server.AddListener(tcp, &listeners.Config{
Auth: new(auth.Allow),