diff --git a/analyzer/src/main/kotlin/managers/GoMod.kt b/analyzer/src/main/kotlin/managers/GoMod.kt index eb4638bd9994..6719fc9a6898 100644 --- a/analyzer/src/main/kotlin/managers/GoMod.kt +++ b/analyzer/src/main/kotlin/managers/GoMod.kt @@ -56,6 +56,9 @@ import org.ossreviewtoolkit.utils.common.stashDirectories import org.ossreviewtoolkit.utils.common.withoutSuffix import org.ossreviewtoolkit.utils.ort.createOrtTempDir +import org.semver4j.RangesList +import org.semver4j.RangesListFactory + /** * The [Go Modules](https://github.com/golang/go/wiki/Modules) package manager for Go. * @@ -97,6 +100,8 @@ class GoMod( override fun transformVersion(output: String) = output.removePrefix("go version go").substringBefore(' ') + override fun getVersionRequirement(): RangesList = RangesListFactory.create("[1.19.0,)") + override fun mapDefinitionFiles(definitionFiles: List): List = definitionFiles.filterNot { definitionFile -> "vendor" in definitionFile