moved websocket code to websocket package

This commit is contained in:
Sam Lewis
2022-10-11 22:58:44 -04:00
parent b3e45f46a4
commit 4cf16d0d41
4 changed files with 108 additions and 111 deletions

4
app.go
View File

@@ -7,7 +7,7 @@ import (
"time"
"github.com/saml-dev/gome-assistant/internal/http"
"github.com/saml-dev/gome-assistant/internal/setup"
ws "github.com/saml-dev/gome-assistant/internal/websocket"
"nhooyr.io/websocket"
)
@@ -30,7 +30,7 @@ you can use to register schedules and listeners.
*/
func App(connString string) app {
token := os.Getenv("AUTH_TOKEN")
conn, ctx, ctxCancel := setup.SetupConnection(connString)
conn, ctx, ctxCancel := ws.SetupConnection(connString)
httpClient := http.NewHttpClient(connString, token)