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:
parent
480f1c0cdd
commit
6187122b81
4 changed files with 10 additions and 9 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue