Skip to content

Tags: scru128/go-scru128

Tags

v3.0.2

v3.0.2 Released

Added:

- Early `nil` checks to `Generator` methods

Maintenance:

- Improved documentation about generator's clock rollback behavior
- Renamed source files: generator -> gen, identifier -> id

v3.0.1

v3.0.1 Released

Most notably, v3 switches the letter case of generated IDs from uppercase (e.g.,
"036Z951MHJIKZIK2GSL81GR7L") to lowercase (e.g., "036z951mhjikzik2gsl81gr7l"),
though it is technically not supposed to break existing code because SCRU128 is
a case-insensitive scheme. Other changes include the removal of deprecated APIs.

Removed:

- Deprecated items:
  - `Generator#GenerateCore()`
  - `Generator#LastStatus()` and `GeneratorStatus`

Changed:

- Letter case of generated IDs from uppercase to lowercase
- Edge case behavior of generator functions' rollback allowance handling

Maintenance:

- Upgraded minimum Go version to 1.20

v3.0.0-rc.1

v3.0.0 Release Candidate (RC1)

v2.3.2

v2.3.2 Released

Changed:

- Error values returned by `Generator` and `Id` to improve error messages

v2.3.1

v2.3.1 Released

Maintenance:

- Tweaked docs and tests

v2.3.0

v2.3.0 Released

Added:

- `GenerateOrAbort()` and `GenerateOrAbortCore()` to `Generator` (formerly named
  as `GenerateNoRewind()` and `GenerateCoreNoRewind()`)
- `Generator#GenerateOrResetCore()`

Deprecated:

- `Generator#GenerateCore()`
- `Generator#LastStatus()` and `GeneratorStatus`

v2.2.1

v2.2.1 Released

Added:

- `GenerateNoRewind()` and `GenerateCoreNoRewind()` to `Generator` (experimental)

Maintenance:

- Improved documentation about generator method flavors

v2.2.0

v2.2.0 Released

Changed:

- `UnmarshalBinary()` behavior so it tries to parse byte slice also as textual
  representation, not only as 128-bit byte array
- `UnmarshalText()` and `UnmarshalBinary()` of `Id` now return error instead of
  panicking when called with nil receiver

Added:

- `sql.Scanner` interface implementation to `Id`

v2.1.2

v2.1.2 Released

Fixed:

- `GenerateCore()` to update `counter_hi` when `timestamp` passed < 1000

v2.1.1

v2.1.1 Released

Fixed:

- `GenerateCore()` to reject zero as `timestamp` value