apply go tools cleanup
This commit is contained in:
@ -41,7 +41,10 @@ func NewScheduler(filePath string) (Scheduler, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("path:%v does not exist and unable to create: err: %w", filePath, err)
|
||||
}
|
||||
f.Close()
|
||||
err = f.Close()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.Info("scheduler file does not exist, will be created", "path", filePath)
|
||||
} else {
|
||||
err = yaml.Unmarshal(data, &s.lastSuccessTime)
|
||||
|
Reference in New Issue
Block a user