mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-05 23:15:07 -06:00
refactor: move parsing into internal/parse module, move other functions into misc
This commit is contained in:
3
app.go
3
app.go
@@ -16,6 +16,7 @@ import (
|
||||
"github.com/Workiva/go-datastructures/queue"
|
||||
"github.com/Xevion/gome-assistant/internal"
|
||||
"github.com/Xevion/gome-assistant/internal/http"
|
||||
"github.com/Xevion/gome-assistant/internal/parse"
|
||||
ws "github.com/Xevion/gome-assistant/internal/websocket"
|
||||
)
|
||||
|
||||
@@ -273,7 +274,7 @@ func (a *App) RegisterIntervals(intervals ...Interval) {
|
||||
panic(ErrInvalidArgs)
|
||||
}
|
||||
|
||||
i.nextRunTime = internal.ParseTime(string(i.startTime)).Carbon2Time()
|
||||
i.nextRunTime = parse.ParseTime(string(i.startTime)).Carbon2Time()
|
||||
now := time.Now()
|
||||
for i.nextRunTime.Before(now) {
|
||||
i.nextRunTime = i.nextRunTime.Add(i.frequency)
|
||||
|
||||
Reference in New Issue
Block a user