Skip to content

Commit

Permalink
Fix ineffassign warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lebauce committed Sep 25, 2024
1 parent 8334092 commit c703a0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/fanal/analyzer/os/redhatbase/redhatbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ func (a redhatOSAnalyzer) parseRelease(r io.Reader) (types.OS, error) {
}, nil
case "red hat enterprise linux coreos":
// https://access.redhat.com/articles/6907891
rhelVersion := "8.2"

var major, minor, rel int

Expand All @@ -92,6 +91,7 @@ func (a redhatOSAnalyzer) parseRelease(r io.Reader) (types.OS, error) {

coreosVersion, err := semver.Parse(fmt.Sprintf("%d.%d.%d", major, minor, rel))
if err == nil {
var rhelVersion string
if coreos4_16, _ := semver.Parse("4.16.0"); coreosVersion.GreaterThanOrEqual(coreos4_16) {
rhelVersion = "9.4"
} else if coreos4_13, _ := semver.Parse("4.13.0"); coreosVersion.GreaterThanOrEqual(coreos4_13) {
Expand Down

0 comments on commit c703a0c

Please sign in to comment.