package
module
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Aug 5, 2021
License: BSL-1.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
semver

About
semver is a Go package that provides functions to create version numbers as defined on http://semver.org. semver is published on https://github.com/vbsw/misc/semver.
Example
Source:
package main
import (
"fmt"
"github.com/vbsw/misc/semver"
)
func main() {
version = semver.New(1, 0, 2, "", "")
fmt.Println("version:", version)
}
Output:
version: 1.0.2
References
Documentation
¶
String returns major, minor and patch number with additional preRel
and metadata formatted "<major>.<minor>.<patch>[-<preRel>][+<metadata>]".
Version is the interface to access version numbers.
New returns an object implementing the Version interface.
Additional parameters are pre-release label and metadata.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.