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
+12 -12
View File
@@ -13,18 +13,6 @@ import (
"github.com/jwetzell/showbridge-go/internal/config"
)
type UDPClient struct {
config config.ModuleConfig
Addr *net.UDPAddr
Port uint16
conn *net.UDPConn
ctx context.Context
inputHandler common.InputHandler
logger *slog.Logger
cancel context.CancelFunc
connMu sync.Mutex
}
func init() {
RegisterModule(ModuleRegistration{
Type: "net.udp.client",
@@ -67,6 +55,18 @@ func init() {
})
}
type UDPClient struct {
config config.ModuleConfig
Addr *net.UDPAddr
Port uint16
conn *net.UDPConn
ctx context.Context
inputHandler common.InputHandler
logger *slog.Logger
cancel context.CancelFunc
connMu sync.Mutex
}
func (uc *UDPClient) Id() string {
return uc.config.Id
}