mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-09-02 03:38:58 +00:00
move init functions to top of file
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user