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
@@ -14,17 +14,6 @@ import (
_ "modernc.org/sqlite"
)
type DbSqlite struct {
config config.ModuleConfig
Dsn string
ctx context.Context
inputHandler common.InputHandler
db *sql.DB
logger *slog.Logger
dbMu sync.Mutex
cancel context.CancelFunc
}
func init() {
RegisterModule(ModuleRegistration{
Type: "db.sqlite",
@@ -53,6 +42,17 @@ func init() {
})
}
type DbSqlite struct {
config config.ModuleConfig
Dsn string
ctx context.Context
inputHandler common.InputHandler
db *sql.DB
logger *slog.Logger
dbMu sync.Mutex
cancel context.CancelFunc
}
func (dbs *DbSqlite) Id() string {
return dbs.config.Id
}