summaryrefslogtreecommitdiff
path: root/internal/schedule
diff options
context:
space:
mode:
Diffstat (limited to 'internal/schedule')
-rw-r--r--internal/schedule/schedule.go5
-rw-r--r--internal/schedule/stats.go3
2 files changed, 5 insertions, 3 deletions
diff --git a/internal/schedule/schedule.go b/internal/schedule/schedule.go
index 4f25fb4..9b31f88 100644
--- a/internal/schedule/schedule.go
+++ b/internal/schedule/schedule.go
@@ -12,6 +12,7 @@ import (
"codeberg.org/snonux/gos/internal/config"
"codeberg.org/snonux/gos/internal/entry"
"codeberg.org/snonux/gos/internal/oi"
+ "codeberg.org/snonux/gos/internal/platforms"
"codeberg.org/snonux/gos/internal/prompt"
)
@@ -20,8 +21,8 @@ var (
ErrNothingQueued = errors.New("nothing queued")
)
-func Run(args config.Args, platform string) (entry.Entry, error) {
- dir := fmt.Sprintf("%s/db/platforms/%s", args.GosDir, strings.ToLower(platform))
+func Run(args config.Args, platform platforms.Platform) (entry.Entry, error) {
+ dir := fmt.Sprintf("%s/db/platforms/%s", args.GosDir, platform.String())
stats, err := newStats(dir, args.Lookback, args.Target)
if err != nil {
return entry.Zero, err
diff --git a/internal/schedule/stats.go b/internal/schedule/stats.go
index 1cbc4ec..42f9332 100644
--- a/internal/schedule/stats.go
+++ b/internal/schedule/stats.go
@@ -11,6 +11,7 @@ import (
"codeberg.org/snonux/gos/internal/colour"
"codeberg.org/snonux/gos/internal/entry"
"codeberg.org/snonux/gos/internal/oi"
+ "codeberg.org/snonux/gos/internal/platforms"
"codeberg.org/snonux/gos/internal/timestamp"
)
@@ -44,7 +45,7 @@ func (s stats) String() string {
)
}
-func (s stats) Render(platform string) {
+func (s stats) Render(platform platforms.Platform) {
var sb strings.Builder
sep := colour.SInfo2f("+%s+%s+", strings.Repeat("-", 22), strings.Repeat("-", 13))