Skip to content

Commit

Permalink
refactor: refactor getSemverFunc
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Jan 9, 2023
1 parent a191505 commit 0640f2f
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 0640f2f

Please sign in to comment.