start on api

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2017-07-29 10:11:50 -04:00
parent 2c1baa96bb
commit 7574b334cc
No known key found for this signature in database
GPG key ID: A519480096146526
364 changed files with 166263 additions and 1 deletions

15
version/version.go Normal file
View 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
View 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)
}
}