# README
go-semver
Usage
from command-line
main.go
package main
import (
semver "github.com/ktr0731/go-semver"
)
var version = semver.MustParse("0.1.1")
// something...
if you want to write the result directly, use -w
option.
$ bump minor main.go
package main
import (
semver "github.com/ktr0731/go-semver"
)
var version = semver.MustParse("0.2.0")
// something...
as library
package main
import (
"fmt"
semver "github.com/ktr0731/go-semver"
)
var v = semver.MustParse("0.1.1")
func main() {
fmt.Printf("[%s] major: %d, minor: %d, patch: %d\n", v, v.Major, v.Minor, v.Patch)
// bump up
v.Bump(semver.VersionTypeMinor)
fmt.Printf("[%s] major: %d, minor: %d, patch: %d\n", v, v.Major, v.Minor, v.Patch)
}
$ go run main.go
[0.1.1] major: 0, minor: 1, patch: 1
[0.2.0] major: 0, minor: 2, patch: 0
# Packages
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author