Loading version/version.go 0 → 100644 +46 −0 Original line number Diff line number Diff line package version import "fmt" // Type specivies the version type type Type uint // Type values const ( Unspecified Type = iota Development Production ) const ( txtUnspecified = "unspecified" txtDevelopment = "development" txtProduction = "production" ) // String returns the type in textual form func (t Type) String() string { switch t { case Development: return txtDevelopment case Production: return txtProduction default: return txtUnspecified } } // Version describes the version type Version struct { Major, Minor, Release uint Type Type } const ( fmtVersion = "%d.%d.%d" ) // String returns the version in textual form func (v *Version) String() string { return fmt.Sprintf(fmtVersion, v.Major, v.Minor, v.Release) } version/version_test.go 0 → 100644 +7 −0 Original line number Diff line number Diff line package version import "testing" func TestDummy(t *testing.T) { t.Skip("dummy test not implemented") } Loading
version/version.go 0 → 100644 +46 −0 Original line number Diff line number Diff line package version import "fmt" // Type specivies the version type type Type uint // Type values const ( Unspecified Type = iota Development Production ) const ( txtUnspecified = "unspecified" txtDevelopment = "development" txtProduction = "production" ) // String returns the type in textual form func (t Type) String() string { switch t { case Development: return txtDevelopment case Production: return txtProduction default: return txtUnspecified } } // Version describes the version type Version struct { Major, Minor, Release uint Type Type } const ( fmtVersion = "%d.%d.%d" ) // String returns the version in textual form func (v *Version) String() string { return fmt.Sprintf(fmtVersion, v.Major, v.Minor, v.Release) }
version/version_test.go 0 → 100644 +7 −0 Original line number Diff line number Diff line package version import "testing" func TestDummy(t *testing.T) { t.Skip("dummy test not implemented") }