Release v1.0.0-rc4 latest
What's Changed
- Refactor result package by @RincewindsHat in https://github.com/NETWAYS/go-check/pull/152
- Make Overall concurrency-safe by @martialblog in https://github.com/NETWAYS/go-check/pull/158
- Merge worse.go into status.go by @martialblog in https://github.com/NETWAYS/go-check/pull/155
- Fix perfdata example in README by @RincewindsHat in https://github.com/NETWAYS/go-check/pull/154
- Provide commonly used symbols as public constants by @martialblog in https://github.com/NETWAYS/go-check/pull/160
- Replace vertical bars in Exit and Overall output by @martialblog in https://github.com/NETWAYS/go-check/pull/161
- Enable -race in unittests by @martialblog in https://github.com/NETWAYS/go-check/pull/157
- Add package level godoc and merge perfdata.go files by @martialblog in https://github.com/NETWAYS/go-check/pull/156
- Fix worst state example by @RincewindsHat in https://github.com/NETWAYS/go-check/pull/145
- Remove various old nolint statements by @martialblog in https://github.com/NETWAYS/go-check/pull/149
- Update example in README by @martialblog in https://github.com/NETWAYS/go-check/pull/140
- Extend convert and result test cases by @martialblog in https://github.com/NETWAYS/go-check/pull/142
- Apply go fix by @RincewindsHat in https://github.com/NETWAYS/go-check/pull/138
- Bump golangci-lint version by @martialblog in https://github.com/NETWAYS/go-check/pull/139
Breaking changes
Refactored status to be a type. The Status type now implements the Stringer interface
Exit codes are now represented by a Status type instead of an integer. The previous constants have been replaced by this type. A constructor from an integer and string was added.
NewStatus(status int) (Status, error)
NewStatusFromString(status string) (Status, error)
The StatusText function was replaced by implementing the Stringer interface in the Status type
Removed ExitRaw, replaced by Exit
Exit is now the primary function to handle program exit and status code handling.
Removed Exitf, replaced by Exit and fmt.Sprintf
Exitf was removed and should be replaced by using Exit with fmt.Sprintf
// Was
check.Exitf(check.OK, "Everything is fine - answer=%d", 42)
// Now
check.Exit(check.OK, fmt.Sprintf("Everything is fine - value=%d", 42))
Rework ParseBytes to return uint64 instead of interface
ParseBytes now returns an uint64 instead of an interface. The BytesIEC and BytesSI types have been replaces by functions with the same name to get a string representation of a number of unit64 bytes.
b, err := ParseBytes("2MiB")
// uint64 2 * 1024 * 1024
fmt.Println(convert.BytesIEC(b))
// "2MiB"
The perfdata package was merged into the check package
// Was
perfdata := perfdata.PerfdataList{}
// Now
perfdata := check.PerfdataList{}
WorstState was moved from the result to the check package
The WorstState is now in the check package. Otherwise the function has not changed.
// Was
rc = result.WorstState(states...)
// Now
rc = check.WorstState(states...)
Refactored and concurrency-safe Overall
The Overall type has been overhauled.
The Add and AddSubcheck now both append a PartialResults to simplify the behavior the the internals. The Summary attribute was replaced by the OKSummary.
Overall is now concurrency-safe.
Full Changelog: https://github.com/NETWAYS/go-check/compare/v1.0.0-rc3...v1.0.0-rc4
go-check-v1.0.0-rc4.tar.gzRelease tarball |
application/gzip | 2026-06-23 | Download from Github |
Release v1.0.0-rc3
What's Changed
- Refactor result package by @RincewindsHat in https://github.com/NETWAYS/go-check/pull/152
- Make Overall concurrency-safe by @martialblog in https://github.com/NETWAYS/go-check/pull/158
- Merge worse.go into status.go by @martialblog in https://github.com/NETWAYS/go-check/pull/155
- Fix perfdata example in README by @RincewindsHat in https://github.com/NETWAYS/go-check/pull/154
- Enable -race in unittests by @martialblog in https://github.com/NETWAYS/go-check/pull/157
- Add package level godoc and merge perfdata.go files by @martialblog in https://github.com/NETWAYS/go-check/pull/156
- Fix worst state example by @RincewindsHat in https://github.com/NETWAYS/go-check/pull/145
- Remove various old nolint statements by @martialblog in https://github.com/NETWAYS/go-check/pull/149
- Update example in README by @martialblog in https://github.com/NETWAYS/go-check/pull/140
- Extend convert and result test cases by @martialblog in https://github.com/NETWAYS/go-check/pull/142
- Apply go fix by @RincewindsHat in https://github.com/NETWAYS/go-check/pull/138
- Bump golangci-lint version by @martialblog in https://github.com/NETWAYS/go-check/pull/139
Breaking changes
Refactored status to be a type. The Status type now implements the Stringer interface
Exit codes are now represented by a Status type instead of an integer. The previous constants have been replaced by this type. A constructor from an integer and string was added.
NewStatus(status int) (Status, error)
NewStatusFromString(status string) (Status, error)
The StatusText function was replaced by implementing the Stringer interface in the Status type
Removed ExitRaw, replaced by Exit
Exit is now the primary function to handle program exit and status code handling.
Removed Exitf, replaced by Exit and fmt.Sprintf
Exitf was removed and should be replaced by using Exit with fmt.Sprintf
// Was
check.Exitf(check.OK, "Everything is fine - answer=%d", 42)
// Now
check.Exit(check.OK, fmt.Sprintf("Everything is fine - value=%d", 42))
Rework ParseBytes to return uint64 instead of interface
ParseBytes now returns an uint64 instead of an interface. The BytesIEC and BytesSI types have been replaces by functions with the same name to get a string representation of a number of unit64 bytes.
b, err := ParseBytes("2MiB")
// uint64 2 * 1024 * 1024
fmt.Println(convert.BytesIEC(b))
// "2MiB"
WorstState was moved from the result to the check package
The WorstState is now in the check package. Otherwise the function has not changed.
// Was
rc = result.WorstState(states...)
// Now
rc = check.WorstState(states...)
Refactored and concurrency-safe Overall
The Overall type has been overhauled.
The Add and AddSubcheck now both append a PartialResults to simplify the behavior the the internals. The Summary attribute was replaced by the OKSummary.
Overall is now concurrency-safe.
Full Changelog: https://github.com/NETWAYS/go-check/compare/v1.0.0-rc2...v1.0.0-rc3
go-check-v1.0.0-rc3.tar.gzRelease tarball |
application/gzip | 2026-06-18 | Download from Github |
Release v1.0.0-rc2
What's Changed
- Fix worst state example by @RincewindsHat in https://github.com/NETWAYS/go-check/pull/145
- Remove various old nolint statements by @martialblog in https://github.com/NETWAYS/go-check/pull/149
Breaking changes
- Rework ParseBytes to return uint64 instead of interface by @martialblog in https://github.com/NETWAYS/go-check/pull/148
ParseBytes now returns an uint64 instead of an interface. The BytesIEC and BytesSI types have been replaces by functions with the same name to get a string representation of a number of unit64 bytes.
b, err := ParseBytes("2MiB")
// uint64 2 * 1024 * 1024
fmt.Println(convert.BytesIEC(b))
// "2MiB"
Full Changelog: https://github.com/NETWAYS/go-check/compare/v1.0.0-rc1...v1.0.0-rc2
go-check-v1.0.0-rc2.tar.gzRelease tarball |
application/gzip | 2026-06-11 | Download from Github |