wip: refactor(config): fix pointer type

This commit is contained in:
2023-12-31 15:00:25 +11:00
parent 22fee125bc
commit 5bae155b3b
2 changed files with 5 additions and 9 deletions

View File

@@ -40,11 +40,11 @@ func convert(cfg *config.Config) *wConfig {
func convertSchedule(cfg config.CronTimeSpec) task.CronTimeSpec {
switch v := cfg.(type) {
case config.SpecAny:
case *config.SpecAny:
return task.NewCronAnySpec()
case config.SpecExact:
case *config.SpecExact:
return task.NewCronExactSpec(v.Value())
case config.SpecMultiOccurrence:
case *config.SpecMultiOccurrence:
return task.NewCronMultiOccurrenceSpec(v.Values()...)
}