move init functions to top of file

This commit is contained in:
Joel Wetzell
2026-05-22 17:45:03 -05:00
parent fb3c775765
commit 4323a21015
67 changed files with 1706 additions and 1706 deletions
+11 -11
View File
@@ -16,17 +16,6 @@ import (
"github.com/jwetzell/showbridge-go/internal/config"
)
type WebSocketClient struct {
config config.ModuleConfig
URL url.URL
ctx context.Context
conn *websocket.Conn
inputHandler common.InputHandler
logger *slog.Logger
cancel context.CancelFunc
connMu sync.Mutex
}
func init() {
RegisterModule(ModuleRegistration{
Type: "websocket.client",
@@ -63,6 +52,17 @@ func init() {
})
}
type WebSocketClient struct {
config config.ModuleConfig
URL url.URL
ctx context.Context
conn *websocket.Conn
inputHandler common.InputHandler
logger *slog.Logger
cancel context.CancelFunc
connMu sync.Mutex
}
func (wc *WebSocketClient) Id() string {
return wc.config.Id
}