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

@@ -24,7 +24,7 @@ func main() {
fmt.Println(aurora.Magenta("Mochi MQTT Server initializing..."), aurora.Cyan("TCP"))
server := mqtt.New()
server := mqtt.NewServer(nil)
ws := listeners.NewWebsocket("ws1", ":1882")
err := server.AddListener(ws, nil)
if err != nil {