1
0
mirror of https://github.com/google/uuid.git synced 2024-11-28 08:49:08 +02:00
Commit Graph

94 Commits

Author SHA1 Message Date
Martin Lindhe
1f1ba6fb7a make 'go vet' happy 2017-11-22 06:14:10 +01:00
pborman
8c31c18f31
Merge pull request #23 from loderunner/master
add FromBytes constructor
2017-11-13 08:03:52 -08:00
Charles Francoise
5c50970d1d add FromBytes constructor 2017-11-10 21:33:01 +01:00
pborman
e367a344cb Merge pull request #22 from kortschak/constant
Remove never-true conditional
2017-10-19 10:36:51 -07:00
kortschak
5b5a8cb7c5 Remove never-true conditional 2017-10-19 15:34:32 +10:30
pborman
7e072fc3a7 Merge pull request #17 from Kerrigan29a/patch-1
A little error in the documentation of dce.go
2017-08-14 07:36:39 -07:00
Javier Escalada
3e2a039c14 A little error in the documentation of dce.go
I think that could be an error in the documentation of [NewDCEGroup](281f560d28/dce.go (L53)) and [NewDCEPerson](281f560d28/dce.go (L45))
2017-08-12 17:57:52 +01:00
pborman
281f560d28 Merge pull request #16 from KonstantinCodes/typos
Typos suggested by @corburn
2017-07-28 10:43:18 -07:00
Konstantin Scheumann
0614758b5f Typos suggested by @corburn 2017-07-28 14:14:46 +02:00
pborman
b7be3e3c4c Merge pull request #15 from sjeandeaux/test/data-egals-data
[test] change data != data by data != uuid
2017-07-24 08:24:35 -07:00
Stéphane Jeandeaux
cdf9b51fe8 [test] compare two slices of bytes thanks @maknihamdi 2017-07-23 17:01:55 +02:00
pborman
1c6adf5cd1 Merge pull request #13 from oreqizer/patch-1
version4: Typo in 'New' doc
2017-07-10 07:57:55 -07:00
Boris
264af6d852 version4: Typo in 'New' doc
Remove redundant 'is'.
2017-07-07 12:56:32 +02:00
pborman
6a5e285548 Merge pull request #11 from thatguystone/master
Support NULLs in Scan()
2017-03-06 06:51:42 -08:00
Andrew Stone
3694829644 sql: Support nil values 2017-03-03 14:59:38 -08:00
Andrew Stone
c96242ef50 sql: Remove redundant type asserts 2017-03-03 14:58:01 -08:00
pborman
064e2069ce Update .travis.yml 2016-11-28 11:12:14 -08:00
pborman
ad42bb4dbc Merge pull request #9 from syohex/correct-rfc-number
Correct RFC number
2016-10-31 10:08:01 -07:00
Syohei YOSHIDA
6d68e26893 Correct RFC number 2016-07-08 13:55:56 +09:00
Paul Borman
f3f4b54b2f Fix type 2016-02-29 06:24:49 -08:00
Paul Borman
a34cdf67a6 Merge branch 'master' of https://github.com/google/uuid 2016-02-29 06:19:06 -08:00
Paul Borman
9887602f22 Merge branch 'master' of https://github.com/google/uuid 2016-02-29 06:13:44 -08:00
pborman
ca12c440f3 Merge pull request #5 from bmatsuo/bmatsuo/no-unsafe-parsing
optimize internal parsing function -- avoid unsafe []byte parsing
2016-02-29 06:12:54 -08:00
pborman
dfce887783 Merge pull request #7 from bmatsuo/bmatsuo/godoc-fixes
Misc godoc fixes
2016-02-29 06:10:02 -08:00
Paul Borman
33471c92ef Remove underscores form private variables. 2016-02-29 06:07:51 -08:00
Paul Borman
834b00a6a5 Bring naming of exported values inline with current Go practice. 2016-02-29 06:04:36 -08:00
Bryan Matsuo
9ce06d2d1d small change to NewUUID return docs 2016-02-28 01:20:19 -08:00
Bryan Matsuo
edbe6ec0cc make receiver names for marshal.go methods consistent with other UUID methods 2016-02-28 01:03:09 -08:00
Bryan Matsuo
3018594d88 misc godoc fixes
Fairly simple typos.  The only peculiar thing is the godoc comment for
UUID.Version().
2016-02-28 00:52:46 -08:00
pborman
386477fd90 Merge pull request #6 from bmatsuo/bmatsuo/fix-file-perms
remove the spurious executable bit from go source files
2016-02-26 07:54:41 -08:00
pborman
2fed5ac765 Merge pull request #3 from bmatsuo/bmatsuo/generic-must-function
A generic Must function
2016-02-26 07:53:54 -08:00
Bryan Matsuo
bff124aad2 remove the spurious executable bit from go source files
There is no reason for the bit to be set on these files.  And this is a
minor annoyance for me.  On my system `ls` colors executable files by
default and it was needlessly destracting in this case.
2016-02-25 22:45:49 -08:00
Bryan Matsuo
7508f98c71 optimize internal parsing function -- avoid unsafe []byte parsing
Making xtob take two byte arguments avoids a lot of slicing.  This makes
the Parse function faster.  In addition, because so much slicing is
avoiding, duplicating the parse logic to ParseBytes resulted in the
function being faster than Parse (<1ns).

The BenchmarkParseBytesNative function has been removed (parseBytes was
identical to ParseBytes).  And a new benchmark,
BenchmarkParseBytesUnsafe, has been added to benchmark the old way of
parsing []byte (which is slightly slower than Parse and thus the new
ParseBytes implementation).

    benchmark                         old ns/op     new ns/op     delta
    BenchmarkUUID_MarshalJSON-4       685           667           -2.63%
    BenchmarkUUID_UnmarshalJSON-4     1145          1162          +1.48%
    BenchmarkParse-4                  61.6          56.5          -8.28%
    BenchmarkParseBytes-4             65.7          55.9          -14.92%
    BenchmarkParseBytesCopy-4         121           115           -4.96%
    BenchmarkNew-4                    1665          1643          -1.32%
    BenchmarkUUID_String-4            112           113           +0.89%
    BenchmarkUUID_URN-4               117           119           +1.71%

    benchmark                         old allocs     new allocs     delta
    BenchmarkUUID_MarshalJSON-4       4              4              +0.00%
    BenchmarkUUID_UnmarshalJSON-4     2              2              +0.00%
    BenchmarkParse-4                  0              0              +0.00%
    BenchmarkParseBytes-4             0              0              +0.00%
    BenchmarkParseBytesCopy-4         1              1              +0.00%
    BenchmarkNew-4                    1              1              +0.00%
    BenchmarkUUID_String-4            1              1              +0.00%
    BenchmarkUUID_URN-4               1              1              +0.00%

    benchmark                         old bytes     new bytes     delta
    BenchmarkUUID_MarshalJSON-4       248           248           +0.00%
    BenchmarkUUID_UnmarshalJSON-4     248           248           +0.00%
    BenchmarkParse-4                  0             0             +0.00%
    BenchmarkParseBytes-4             0             0             +0.00%
    BenchmarkParseBytesCopy-4         48            48            +0.00%
    BenchmarkNew-4                    16            16            +0.00%
    BenchmarkUUID_String-4            48            48            +0.00%
    BenchmarkUUID_URN-4               48            48            +0.00%
2016-02-25 21:48:37 -08:00
Bryan Matsuo
2d45679b04 cosmetic change for NIL return value 2016-02-25 20:56:08 -08:00
Bryan Matsuo
8748089bb5 create NewRandom func consistent with other version constructors
The New function is kept for convenience and relies on the NewRandom
function.
2016-02-25 20:56:08 -08:00
Bryan Matsuo
7dd4798941 replace Must* funcs with a single generic Must func
The MustParse and MustNewUUID functions have been removed since they
can be replaced simply using the new function.

    uuid.Must(uuid.Parse(s))
    uuid.Must(uuid.NewUUID())

This also fixes a spurious bug in the UnmarshalJSON method that
prevented compiling the json.go file.
2016-02-25 20:56:08 -08:00
Paul Borman
a8b7006b7b Remove json.go 2016-02-25 19:51:46 -08:00
Paul Borman
06994e737f Update readme to make sure people know the API might change. 2016-02-19 12:57:29 -08:00
Paul Borman
9e951e1b07 Change a UUID from []byte to [16]byte along with other API changes. 2016-02-19 12:30:25 -08:00
Paul Borman
82d3e379a2 Update paths 2016-02-16 15:19:02 -08:00
pborman
cd53251766 Merge pull request #24 from bmatsuo/bmatsuo/array-conversions
Array conversions
2016-02-12 08:11:50 -08:00
Bryan Matsuo
be63595eee add method Array.String() 2016-02-12 08:02:43 -08:00
Bryan Matsuo
6032e8b8f0 don't slice arrays to test their values 2016-02-11 12:26:40 -08:00
Bryan Matsuo
b4118685bb define Array type to convert UUIDs to/from map keys. 2016-02-11 12:00:09 -08:00
pborman
0f1a46960a Merge pull request #14 from shawnps/patch-1
use Error rather than Errorf when there are no formatting directives
2016-02-09 11:07:13 -08:00
pborman
c3079288a2 Merge pull request #16 from theory/driver.Valuer
Add support for driver.Valuer.
2016-02-09 11:06:20 -08:00
Paul Borman
a97ce2ca70 Revert godoc link 2016-02-09 10:59:13 -08:00
Paul Borman
ad90cc0170 Add build status 2016-02-09 10:54:59 -08:00
Paul Borman
af95d6ed42 Add travis-ci configuration for testing. 2016-02-09 10:27:59 -08:00
pborman
27e2c5ea7b Merge pull request #13 from bmatsuo/optimizations
Optimizations
2016-02-09 10:14:57 -08:00