mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-21 14:50:53 -08:00
fix: remove a patch number from the recommendation link (#2891)
This commit is contained in:
@@ -3,6 +3,7 @@ package artifact
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/hashicorp/go-multierror"
|
||||
@@ -564,7 +565,6 @@ func canonicalVersion(ver string) string {
|
||||
if v.IsPreRelease() || v.Metadata() != "" {
|
||||
return devVersion
|
||||
}
|
||||
|
||||
// Add "v" prefix, "0.34.0" => "v0.34.0" for the url
|
||||
return "v" + ver
|
||||
// Add "v" prefix and cut a patch number, "0.34.0" => "v0.34" for the url
|
||||
return fmt.Sprintf("v%d.%d", v.Major(), v.Minor())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user