mirror of
https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git
synced 2024-11-18 15:58:12 +00:00
b4859cda6b
Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.7.0 to 0.13.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.7.0...v0.13.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
23 lines
401 B
Go
23 lines
401 B
Go
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)
|
|
}
|