1
0
mirror of https://github.com/google/uuid.git synced 2025-02-20 12:33:21 +02:00

132 Commits

Author SHA1 Message Date
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 0.2 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. v0.1 v.1 2016-02-19 12:30:25 -08:00
Paul Borman
82d3e379a2 Update paths v0 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
Paul Borman
6cc520cd8b Fix govet issues and make node.go thread safe.
Includes changes from mischief and shawnps.
2016-02-09 09:58:31 -08:00
pborman
ae80070655 Merge pull request #23 from jboverfelt/sql-test
Test fixes
2016-02-09 08:02:55 -08:00
Shawn Smith
6ce35c2639 use Error rather than Errorf when there are no formatting directives 2016-02-09 14:15:05 +09:00
David E. Wheeler
5aa6bf02fe De-dupe comment. 2016-02-08 15:47:57 -08:00
David E. Wheeler
26c42f1335 Value() is on UUID, not *UUID. 2016-02-08 15:47:57 -08:00
David E. Wheeler
0384d88412 Add support for driver.Valuer.
It just returns a string, but that should be recognizable by any database that
supports UUIDs, since it's the standard format.
2016-02-08 15:47:57 -08:00
Justin Overfelt
c1c74aeb83 Fix broken test and update tests to include coverage for empty uuid scenarios 2016-02-08 18:28:58 -05:00
pborman
5bc73798cc Merge pull request #19 from dansouza/master
altered uuid.Scan() so that it allows for empty UUIDs to be read ...
2016-02-08 13:05:45 -08:00
pborman
14801136da Merge pull request #10 from wallclockbuilder/master
Create README.md
2016-02-08 08:53:31 -08:00
pborman
eff1cd8d1e Merge pull request #17 from shawnps/patch-4
fix typo
2016-02-08 08:47:06 -08:00
pborman
db13d9ecca Merge pull request #20 from shawnps/patch-5
typo
2016-02-08 08:46:39 -08:00
pborman
b0e66f28f3 Merge pull request #21 from cd1/patch-1
Fix documentation typo
2016-02-08 08:46:13 -08:00