Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Diagnosticism.Go - Changes <!-- omit in toc -->

## 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);
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions examples/libver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
21 changes: 18 additions & 3 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 //////////////////////////// */
6 changes: 3 additions & 3 deletions version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand All @@ -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())
}
Loading