package
module
Version:
v0.0.0-...-3f0e695
Opens a new window with list of versions in this module.
Published: Feb 5, 2017
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 6
Opens a new window with list of known importers.
README
¶
Versioning
A library to make set/get/writing versioning information easier.
Installation
Use go get:
go get -u github.com/tonglil/versioning
Usage
-
Add in main.go:
var version string
func init() {
versioning.Set(version)
}
-
Where you want to get the version:
version := versioning.Get()
// or
versioning.Write(os.Stdout)
-
Build your binary with this flag:
go build -ldflags "-X main.version=123-up-to-you"
Development
Roadmap:
- Checking new versions
- Self-upgrading binary
Documentation
¶
Write the version to a writer.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.