start on api
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
2c1baa96bb
commit
7574b334cc
364 changed files with 166263 additions and 1 deletions
15
version/version.go
Normal file
15
version/version.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package version
|
||||
|
||||
var (
|
||||
Version = "0.0.1"
|
||||
|
||||
// Build will be overwritten automatically by the build system
|
||||
Build = "-dev"
|
||||
|
||||
// GitCommit will be overwritten automatically by the build system
|
||||
GitCommit = "HEAD"
|
||||
)
|
||||
|
||||
func FullVersion() string {
|
||||
return Version + Build + " (" + GitCommit + ")"
|
||||
}
|
15
version/version_test.go
Normal file
15
version/version_test.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package version
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestFullVersion(t *testing.T) {
|
||||
version := FullVersion()
|
||||
|
||||
expected := Version + Build + " (" + GitCommit + ")"
|
||||
|
||||
if version != expected {
|
||||
t.Fatalf("invalid version returned: %s", version)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue