feat: refactor client methods

- change `ProcessServerMessages` to use receiver instead of parameter
- update `Disconnect` method to use receiver for better encapsulation
- move `Client` definition to `connect.go`

🤖
This commit is contained in:
Sebastian Mark 2024-10-30 09:51:59 +01:00
parent 480f1c0cdd
commit 6187122b81
4 changed files with 10 additions and 9 deletions

View file

@ -49,8 +49,8 @@ func Start() {
client.Password = config.Password
channel := make(chan GoTomato.ServerMessage)
go websocket.ProcessServerMessages(client, channel)
go client.ProcessServerMessages(channel)
frontend.UpdateLoop(client, config, channel)
websocket.Disconnect(client)
client.Disconnect()
}