Skip to content

Releases: gofrs/uuid

3.3.0

05 May 00:36
v3.3.0
Compare
Choose a tag to compare
  • the UUID type now satisfied fmt.Formatter; see the .Format() method
    docs for more info. Contributed by Dylan Bourque (@dylan-bourque) in #72.
  • Codec related error messages have been adjusted to improve clarity and consistency with error message standards. Contributed by Josh Leverette (@coder543 ) in #78.

3.4.0

30 Dec 17:55
Compare
Choose a tag to compare

Note: This release is identical to v3.3.0 and was created by mistake. It is safe to use either.

  • the UUID type now satisfied fmt.Formatter; see the .Format() method
    docs for more info. Contributed by Dylan Bourque (@dylan-bourque) in #72.
  • Codec related error messages have been adjusted to improve clarity and consistency with error message standards. Contributed by Josh Leverette (@coder543 ) in #78.

3.2.0

11 Jan 07:26
v3.2.0
6b08a5c
Compare
Choose a tag to compare
  • Remove support for the experimental Go Modules feature due to issues supporting
    both dep and modules, amongst other concerns.

Please see #61, #66, and #67 for more info.

v3.1.2

30 Oct 01:57
v3.1.2
7077aa6
Compare
Choose a tag to compare

This release improves the interoperability of package uuid with
ORMs such as gorm, per PR #58. Thanks to Jun Jie Nan (@nanjj) for
the contribution.

3.1.1: UUIDs for Workgroups

01 Sep 09:54
v3.1.1
370558f
Compare
Choose a tag to compare

Added go.mod file.

3.1.0

22 Aug 15:39
v3.1.0
d41eeda
Compare
Choose a tag to compare

This release includes new functionality (PR #31) to help consumers extract a
time.Time value out of a Version 1 UUID.

UUIDs have their own internal timestamp, which is a counter of 100ns increments
since the start of the Gregorian Calendar (00:00:00 UTC on 15 Oct, 1582). To
represent that a new Timestamp type was added, with a Time() method used to
convert the timestamp value to a time.Time value.

To extract the timestamp from a Version 1 UUID, a new package
function (TimestampFromV1) was added to extract a Timestamp out of a UUID.
If it's not a V1 UUID it returns an error.

Big thanks to Ron Kuris (@rkuris) for this contribution!

3.0.0

02 Aug 15:42
v3.0.0
c52a240
Compare
Choose a tag to compare

v3.0.0 denotes the first major change by The Gofrs, and encompasses feature
requests / PRs that had been opened against the original project. This version
includes the following breaking changes:

  • update the sql.NullUUID type to support both the json.Marshaler and
    json.Unmarshaler interfaces, which I'll provide more details on later. (#38)
  • remove the Equal function from the package, as the UUID type is an array
    type and so you can use == directly for comparisons. (#36 #39)

This version also exposes the internal UUID generator, with constructors, so
that consumers can provide their own HWAddrFunc to get the hardware address of
the node. This can be used by consumers who want to randomize the MAC address in
a V1 UUID. (#42)

In regards to the JSON change, the sql.NullUUID type is one that's used with
the database/sql package to support columns that can contain UUIDs or a NULL
value. This means it's a struct with a UUID and Valid field, so previously a
sql.NullUUID would marshal to JSON like so:

{
  "uuid": {
    "uuid": "3bdef553-9b6a-4620-8a5f-b94bf22a2520",
    "valid": true
  }
}

By implementing the right interfaces from the JSON package, it'll now marshal
like so:

{
  "uuid": "3bdef553-9b6a-4620-8a5f-b94bf22a2520"
}

2.1.0

21 Jul 04:59
v2.1.0
3a54a64
Compare
Choose a tag to compare

Version 2.1.0 is functionally equivalent to 2.0.1. It introduces a documentation
change to indicate that the package's Equal function is deprecated in favor of
just comparing two UUID values to one another using ==. This change was made
in #36.

We plan on removing this function in v3.0.0.

2.0.1

19 Jul 06:38
v2.0.1
65feb42
Compare
Choose a tag to compare

This change includes two small fixes to the Equal package function both done
within #34:

  • update the documentation / function arguments to be more clear
  • compare the UUID values to each other directly, instead of converting to
    slices and then comparing using bytes.Equal

2.0.0

18 Jul 19:53
v2.0.0
09c29bc
Compare
Choose a tag to compare

This is first release of this package as github.com/gofrs/uuid, after having
been forked from github.com/satori/go.uuid at 36e9d2e.

The reason behind the decision to fork was due to lack of engagement from the
original author, when there were fatal bugs present. The intent is to keep up
the support of this package by not having the burden rest on one individual.

This is a major version bump as the forked project introduced breaking
changes (0ef6afb) after v1.2.0 that were never captured in a release. These
changes were the addition of error return values of some of the UUID generation
methods.

A major bug was fixed (#7) that would have resulted in UUIDs that weren't so
unique. The original bug report is here: satori/go.uuid#73

In addition to that, some small API enhancements/fixes were made:

  • export the default generator used by the package-level functions as
    DefaultGenerator (#9)
  • update code to work as documented by supporting braced hashlike UUIDs in the
    FromString callpath (#14)
  • remove named return values from the function definitions (#25)
  • linter caught an issue where an error value was shadowed (#10)

While they have no impact on the functional usage of this package, the following
improvements were also made in areas ranging from docs to testing:

  • set up Travis CI for testing and coveralls for coverage (#6)
  • we stopped testing against older versions of Go, to support subtests (#21)
  • tests no longer use gocheck and are stdlib only (#17)
  • added support for fuzz testing (#5 #17)
  • enhanced tests to improve coverage (catch issues) (#3 #24)
  • fixed linter issues around variable names (#10)
  • updated docs to be more clear and correct (#8 #12 #16 #28 #29)
  • recommend that consumers only use 2.0.0+ at this point (#30)

This release wouldn't be anywhere near as polished if it weren't for the help of
a few people in the Go community. Alphabetized by their GitHub handles:

There are also a few people who provided input in the #gofrs Slack channel or on
issues / PRs:

  • Cameron Ackerman (@CameronAckermanSEL)
  • Timur Makarchuk (@makarchuk)