Skip to content

jda/go-binver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-binver

common binary versioning for go

Usage:

import (
	"fmt"
	"github.com/jda/go-binver"
)

func ExampleCanonVersion() {
	fmt.Println(binver.CanonVersion())
}

CanonVersion returns the build’s VCS revision (full commit hash) or NO_VERSION when build metadata is missing. If the working tree was dirty when the binary was built, the suffix -tainted is appended.

Example output:

d34db33f12c0ffee9badbeef00bab10cdef12345
d34db33f12c0ffee9badbeef00bab10cdef12345-tainted
NO_VERSION

About

common binary versioning for go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages