feat: use bubbletea framework
- implement TUI in bubbletea - split components into separate files - remove now unused functions - restructure files
This commit is contained in:
parent
9656db5335
commit
8a0ef32c91
14 changed files with 269 additions and 187 deletions
|
@ -12,13 +12,14 @@ type Client ChronoTomato.GoTomatoClient // New websocket client
|
|||
|
||||
// Connects to websocket
|
||||
func Connect(url string) Client {
|
||||
log.Info("Connected ", "host", url)
|
||||
|
||||
conn, _, err := websocket.DefaultDialer.Dial(url, nil)
|
||||
if err != nil {
|
||||
log.Fatal("Dial error!", "reason", err)
|
||||
}
|
||||
|
||||
log.Info("Connected ", "host", url)
|
||||
time.Sleep(time.Second)
|
||||
|
||||
return Client{Conn: conn}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue