Skip to content

Commit

Permalink
Wrap error
Browse files Browse the repository at this point in the history
main.go:288:94: compareEngineVersion - result 1 (error) is always nil (unparam)
func compareEngineVersion(rdsInfo RDSInfo, minimumSupportedInfo MinimumSupportedInfo) (bool, error) {
  • Loading branch information
chaspy committed Feb 7, 2021
1 parent f2d5a0b commit ca932e5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,12 @@ func validateEOLDate(validDate string, now time.Time) (string, error) {
func compareEngineVersion(rdsInfo RDSInfo, minimumSupportedInfo MinimumSupportedInfo) (bool, error) {
engineVersion, err := version.NewVersion(rdsInfo.EngineVersion)
if err != nil {
fmt.Fprintln(os.Stderr, err)
return false, nil
return false, fmt.Errorf("failed to declare engine version: %w", err)
}

minimumSupportedVersion, err := version.NewVersion(minimumSupportedInfo.MinimumSupportedVersion)
if err != nil {
fmt.Fprintln(os.Stderr, err)
return false, nil
return false, fmt.Errorf("failed to declare minimum supported version: %w", err)
}

return engineVersion.LessThan(minimumSupportedVersion), nil
Expand Down

0 comments on commit ca932e5

Please sign in to comment.