Skip to content

Commit

Permalink
Merge pull request #1547 from aquaproj/refactor/semver
Browse files Browse the repository at this point in the history
refactor: refactor getSemverFunc
  • Loading branch information
suzuki-shunsuke committed Jan 9, 2023
2 parents bf9417f + 0640f2f commit 67ad8ff
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pkg/expr/version_constraint.go
Expand Up @@ -20,15 +20,7 @@ func emptySemverWithVersion(constr, ver string) bool {

func getSemverFunc(v string) func(s string) bool {
return func(s string) bool {
a, err := version.NewConstraint(s)
if err != nil {
panic(err)
}
ver, err := version.NewVersion(v)
if err != nil {
panic(err)
}
return a.Check(ver)
return semverWithVersion(s, v)
}
}

Expand Down

0 comments on commit 67ad8ff

Please sign in to comment.