Fix all relevant errors reported by golangci-lint

This commit is contained in:
Renan DelValle 2019-05-28 18:53:51 -07:00
parent 4870b07cf0
commit ce554c767c
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
9 changed files with 143 additions and 70 deletions

View file

@ -31,7 +31,12 @@ func NewDefaultUpdateJob(config *aurora.TaskConfig) *UpdateJob {
req.TaskConfig = config
req.Settings = NewUpdateSettings()
job := NewJob().(*AuroraJob)
job, ok := NewJob().(*AuroraJob)
if !ok {
// This should never happen but it is here as a safeguard
return nil
}
job.jobConfig.TaskConfig = config
// Rebuild resource map from TaskConfig
@ -75,7 +80,11 @@ func NewUpdateJob(config *aurora.TaskConfig, settings *aurora.JobUpdateSettings)
req.TaskConfig = config
req.Settings = settings
job := NewJob().(*AuroraJob)
job, ok := NewJob().(*AuroraJob)
if !ok {
// This should never happen but it is here as a safeguard
return nil
}
job.jobConfig.TaskConfig = config
// Rebuild resource map from TaskConfig