mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-27 05:15:47 +00:00
move config to internal
This commit is contained in:
6
timer.go
6
timer.go
@@ -4,10 +4,12 @@ import (
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"time"
|
||||
|
||||
"github.com/jwetzell/showbridge-go/internal/config"
|
||||
)
|
||||
|
||||
type Timer struct {
|
||||
config ModuleConfig
|
||||
config config.ModuleConfig
|
||||
Duration uint32
|
||||
router *Router
|
||||
timer *time.Timer
|
||||
@@ -16,7 +18,7 @@ type Timer struct {
|
||||
func init() {
|
||||
RegisterModule(ModuleRegistration{
|
||||
Type: "gen.timer",
|
||||
New: func(config ModuleConfig) (Module, error) {
|
||||
New: func(config config.ModuleConfig) (Module, error) {
|
||||
params := config.Params
|
||||
|
||||
duration, ok := params["duration"]
|
||||
|
||||
Reference in New Issue
Block a user