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

108 Commits

Author SHA1 Message Date
pborman
9b3b1e0f5f
Merge pull request #38 from dmitris/go-mod
add go.mod file
2018-09-17 09:00:05 -05:00
Dmitry Savintsev
364ba63b46 add go.mod file 2018-09-17 15:06:12 +02:00
pborman
2768d47f00
Merge pull request #37 from google/borman
Add new parsing support
2018-09-17 07:36:52 -05:00
Paul Borman
16ca3eab7d Add parsing support for:
{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Resolves issue #24
2018-09-09 18:38:29 -05:00
pborman
e704694aed
Merge pull request #35 from OrlovEvgeny/master
edit slice
2018-08-28 13:15:55 -05:00
pborman
7cf75050e9
Merge pull request #26 from martinlindhe/mustparse
add MustParse(), which returns an UUID or panics
2018-08-28 13:14:23 -05:00
Paul Borman
d460ce9f8d Remove leftover comment.
Fix reamde to no longer say this is experimental.
The API is not going to change.
2018-08-27 15:42:32 -05:00
oj
81e4ea7833 edit slice 2018-08-24 16:43:38 +03:00
pborman
dec09d789f
Merge pull request #28 from elliott5/gopherjs
remove "net" dependency when targeting JS via GopherJS
2017-11-29 11:10:14 -08:00
Elliott Stoneham
a4243a3813 remove net when targeting JS 2017-11-29 12:54:27 +00:00
pborman
4ebdd04351
Merge pull request #27 from martinlindhe/master
fix some typos and trivial 'go vet'
2017-11-22 08:26:18 -08:00
Martin Lindhe
9c6b41367e fix some typos 2017-11-22 06:47:31 +01:00
Martin Lindhe
bb91e0b0e2 remove false claim about NewRandom() panic, pointed out in https://github.com/google/uuid/issues/12\#issue-232965368 2017-11-22 06:30:19 +01:00
Martin Lindhe
3d673cf3cf add MustParse(), which returns an UUID or panics 2017-11-22 06:20:00 +01:00
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