Skip to content

A semver package for Go implementing the semver 2.0 spec

License

Notifications You must be signed in to change notification settings

networkteam/semver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

semver

GoDoc Build Status Go Report Card codecov

A semver package for Go implementing the SemVer 2.0 spec.

Why?

We wanted an implementation that follows the spec as closely as possible.

Install

go get github.com/networkteam/semver

Example

package main

import (
	"fmt"

	"github.com/networkteam/semver"
)

func main() {
	v, err := semver.ParseVersion("1.0.0-alpha.1+001")
	if err != nil {
		fmt.Println("Error:", err)
	} else {
		fmt.Println("Parsed Version", v.Major, v.Minor, v.Patch, v.PreRelease, v.Build)
		fmt.Println("String Representation:", v.String())
	}
}

License

MIT

About

A semver package for Go implementing the semver 2.0 spec

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages