Add Version function

This commit is contained in:
Unknwon
2015-01-02 20:13:28 +08:00
parent dae74d1713
commit 28ad8c408b
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -34,8 +34,14 @@ const (
DEFAULT_SECTION = "DEFAULT"
// Maximum allowed depth when recursively substituing variable names.
_DEPTH_VALUES = 99
_VERSION = "1.0.1"
)
func Version() string {
return _VERSION
}
var (
LineBreak = "\n"
+6
View File
@@ -23,6 +23,12 @@ import (
. "github.com/smartystreets/goconvey/convey"
)
func Test_Version(t *testing.T) {
Convey("Get version", t, func() {
So(Version(), ShouldEqual, _VERSION)
})
}
const _CONF_DATA = `
; Package name
NAME = ini