diff --git a/CHANGES.md b/CHANGES.md index 48c606d..157471f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,15 @@ # Diagnosticism.Go - Changes +## 0.13.6 - 20th August 2026 + +* added **Version()** (replacing the **Version** constant), formed by **ver2go.CombineVersion()**; +* documented **Version()** and **VersionString()**; +* **VersionAB** now uses **ver2go.Release**; +* updated **ver2go** to 0.2.0-beta1; +* updated **examples/libver** to use **VersionString()**; +* version string updated for the 0.13.6 release; + + ## 0.13.5 - 20th August 2026 * CI modernisation (matrix + lint); diff --git a/NEWS.md b/NEWS.md index 8f0a62d..e8eaac3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ | Date | News Item | | ------------------- | ----------------------------------------------------------------------------------------------------------------- | +| 20th August 2026 | Release of [**Diagnosticism.Go** 0.13.6](https://github.com/synesissoftware/Diagnosticism.Go/releases/tag/0.13.6) | | 20th August 2026 | Release of [**Diagnosticism.Go** 0.13.5](https://github.com/synesissoftware/Diagnosticism.Go/releases/tag/0.13.5) | | 29th March 2026 | Release of [**Diagnosticism.Go** 0.13.4](https://github.com/synesissoftware/Diagnosticism.Go/releases/tag/0.13.4) | | 18th March 2026 | Release of **Diagnosticism.Go** 0.13.3 | diff --git a/README.md b/README.md index 2eb11ea..898e133 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Basic diagnostic facilities, for Go - [Installation](#installation) - [Components](#components) - [Constants](#constants) + - [Version](#version) - [Functions](#functions) - [Contingent Reporting](#contingent-reporting) - [Debug](#debug) @@ -74,6 +75,21 @@ import d "github.com/synesissoftware/Diagnosticism.Go" No public constants are defined at this time. +### Version + +```Go +const ( + VersionMajor uint16 = /* ... */ + VersionMinor uint16 = /* ... */ + VersionPatch uint16 = /* ... */ + VersionAB uint16 = /* ... */ +) + +func Version() uint64 +func VersionString() string +``` + + ### Functions The following functions are defined: diff --git a/examples/libver/main.go b/examples/libver/main.go index a5f061c..1f92a19 100644 --- a/examples/libver/main.go +++ b/examples/libver/main.go @@ -8,6 +8,6 @@ import ( ) func main() { - fmt.Printf("Diagnosticism v%s\n", ver2go.CalcVersionString(d.VersionMajor, d.VersionMinor, d.VersionPatch, d.VersionAB)) - fmt.Printf("ver2go v%s\n", ver2go.CalcVersionString(ver2go.VersionMajor, ver2go.VersionMinor, ver2go.VersionPatch, ver2go.VersionAB)) + fmt.Printf("Diagnosticism v%s\n", d.VersionString()) + fmt.Printf("ver2go v%s\n", ver2go.VersionString()) } diff --git a/go.mod b/go.mod index 7d036de..1dab276 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.25.0 require ( github.com/stretchr/testify v1.12.1 github.com/synesissoftware/STEGoL v0.3.1 - github.com/synesissoftware/ver2go v0.1.4 + github.com/synesissoftware/ver2go v0.2.0-beta1 golang.org/x/term v0.45.0 ) diff --git a/go.sum b/go.sum index 9e19cd9..44d3519 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWD github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/synesissoftware/STEGoL v0.3.1 h1:00VzAJX5WPt5BpJAffZ33qHeC2g6xjXM0uCgg5KjxbI= github.com/synesissoftware/STEGoL v0.3.1/go.mod h1:rAfqnX1UANIy4/CSsXvyiodid68yHlUgo7i7atexrzE= -github.com/synesissoftware/ver2go v0.1.4 h1:IA0lzR+Wzv5WiwOj6XZJYZYQMq1xn75d6+PIAqqyapM= -github.com/synesissoftware/ver2go v0.1.4/go.mod h1:JlZS4ms4D4cCaYuRh+fbBaNv7BwqrAP4m4/hZzGJ8hU= +github.com/synesissoftware/ver2go v0.2.0-beta1 h1:9Ne+kvCQMWXA+RhWqqjT+jTP+/9LfKDJyUDSJxxhI5A= +github.com/synesissoftware/ver2go v0.2.0-beta1/go.mod h1:JlZS4ms4D4cCaYuRh+fbBaNv7BwqrAP4m4/hZzGJ8hU= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= diff --git a/version.go b/version.go index 527ba2a..3127679 100644 --- a/version.go +++ b/version.go @@ -14,15 +14,30 @@ import "github.com/synesissoftware/ver2go" const ( VersionMajor uint16 = 0 VersionMinor uint16 = 13 - VersionPatch uint16 = 5 - VersionAB uint16 = 0xFFFF - Version uint64 = (uint64(VersionMajor) << 48) + (uint64(VersionMinor) << 32) + (uint64(VersionPatch) << 16) + (uint64(VersionAB) << 0) + VersionPatch uint16 = 6 + VersionAB uint16 = ver2go.Release ) var ( + version = ver2go.CombineVersion(VersionMajor, VersionMinor, VersionPatch, VersionAB) versionString string = ver2go.CalcVersionString(VersionMajor, VersionMinor, VersionPatch, VersionAB) ) +// Version returns this library's version as a packed 64-bit integer, formed +// by ver2go.CombineVersion from VersionMajor, VersionMinor, VersionPatch, +// and VersionAB. The result is suitable for numeric comparison: a later +// release has a strictly greater value than an earlier one that uses the +// same packing. +func Version() uint64 { + return version +} + +// VersionString returns this library's version as a human-readable string, +// formed by ver2go.CalcVersionString from VersionMajor, VersionMinor, +// VersionPatch, and VersionAB. For a final (non-prerelease) version the +// result is of the form "MAJOR.MINOR.PATCH", e.g. "0.13.6". func VersionString() string { return versionString } + +/* ///////////////////////////// end of file //////////////////////////// */ diff --git a/version_test.go b/version_test.go index fd1d9d3..29caeb6 100644 --- a/version_test.go +++ b/version_test.go @@ -11,7 +11,7 @@ import ( const ( Expected_VersionMajor uint16 = 0 Expected_VersionMinor uint16 = 13 - Expected_VersionPatch uint16 = 5 + Expected_VersionPatch uint16 = 6 Expected_VersionAB uint16 = 0xFFFF ) @@ -23,9 +23,9 @@ func Test_Version_Elements(t *testing.T) { } func Test_Version(t *testing.T) { - require.Equal(t, uint64(0x0000_000D_0005_FFFF), Version) + require.Equal(t, uint64(0x0000_000D_0006_FFFF), Version()) } func Test_Version_String(t *testing.T) { - require.Equal(t, "0.13.5", VersionString()) + require.Equal(t, "0.13.6", VersionString()) }