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
+13 -13
View File
@@ -17,19 +17,6 @@ import (
"go.bug.st/serial"
)
type SerialClient struct {
config config.ModuleConfig
ctx context.Context
inputHandler common.InputHandler
Port string
Framer framer.Framer
Mode *serial.Mode
port serial.Port
logger *slog.Logger
cancel context.CancelFunc
portMu sync.Mutex
}
func init() {
RegisterModule(ModuleRegistration{
Type: "serial.client",
@@ -86,6 +73,19 @@ func init() {
})
}
type SerialClient struct {
config config.ModuleConfig
ctx context.Context
inputHandler common.InputHandler
Port string
Framer framer.Framer
Mode *serial.Mode
port serial.Port
logger *slog.Logger
cancel context.CancelFunc
portMu sync.Mutex
}
func (sc *SerialClient) Id() string {
return sc.config.Id
}