fix: Return error by Value, Not Pointer

This commit is contained in:
Justin Hammond 2021-04-21 08:17:36 +08:00
parent cc3409e03c
commit 60dfaa0397

View file

@ -118,7 +118,7 @@ func (s *Scheduler) GetSchedule(id string) (*Schedule, error) {
defer s.mx.Unlock()
j, ok := s.schedules[id];
if !ok {
return nil, &ErrorScheduleNotFound{"Schedule Not Found"}
return nil, ErrorScheduleNotFound{"Schedule Not Found"}
}
return j, nil
}