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
+15 -15
View File
@@ -19,21 +19,6 @@ import (
"github.com/jwetzell/showbridge-go/internal/framer"
)
type TCPServer struct {
config config.ModuleConfig
Addr *net.TCPAddr
Framer framer.Framer
ctx context.Context
inputHandler common.InputHandler
wg sync.WaitGroup
connections []*net.TCPConn
connectionsMu sync.RWMutex
logger *slog.Logger
cancel context.CancelFunc
listener *net.TCPListener
listenerMu sync.Mutex
}
func init() {
RegisterModule(ModuleRegistration{
Type: "net.tcp.server",
@@ -97,6 +82,21 @@ func init() {
})
}
type TCPServer struct {
config config.ModuleConfig
Addr *net.TCPAddr
Framer framer.Framer
ctx context.Context
inputHandler common.InputHandler
wg sync.WaitGroup
connections []*net.TCPConn
connectionsMu sync.RWMutex
logger *slog.Logger
cancel context.CancelFunc
listener *net.TCPListener
listenerMu sync.Mutex
}
func (ts *TCPServer) Id() string {
return ts.config.Id
}