terraform-provider-gitea/vendor/github.com/Masterminds/sprig/semver.go
Malar Invention 00ebcd295e add vendor
2022-04-03 09:37:16 +05:30

24 lines
398 B
Go

package sprig
import (
sv2 "github.com/Masterminds/semver"
)
func semverCompare(constraint, version string) (bool, error) {
c, err := sv2.NewConstraint(constraint)
if err != nil {
return false, err
}
v, err := sv2.NewVersion(version)
if err != nil {
return false, err
}
return c.Check(v), nil
}
func semver(version string) (*sv2.Version, error) {
return sv2.NewVersion(version)
}