mirror of
https://github.com/rancher/rke.git
synced 2025-09-14 14:09:49 +00:00
go mod and vendor changes
This commit is contained in:
committed by
Alena Prokharchyk
parent
9c1c0ea999
commit
091fa14a5d
23
vendor/github.com/Masterminds/sprig/v3/semver.go
generated
vendored
Normal file
23
vendor/github.com/Masterminds/sprig/v3/semver.go
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
package sprig
|
||||
|
||||
import (
|
||||
sv2 "github.com/Masterminds/semver/v3"
|
||||
)
|
||||
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user