semver functions
These functions allow user you to parse a semantic version string or test it with constraint.
It’s implemented with the https://github.com/Masterminds/semver library.
semver.Semver(unreleased)
Unreleased: This function is in development, and not yet available in released builds of gomplate.
Returns a semantic version struct holding the input version string.
The returned struct are defined at: semver.Version.
Usage
Arguments
| name | description |
|---|---|
input |
(required) The input to parse |
Examples
semver.CheckConstraint(unreleased)
Unreleased: This function is in development, and not yet available in released builds of gomplate.
Test whether the input version matches the constraint.
Ref: https://github.com/Masterminds/semver#checking-version-constraints
Usage
Arguments
| name | description |
|---|---|
constraint |
(required) The constraints expression to test. |
input |
(required) The input semantic version string to test. |