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
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
Crístian Deives
cf9841023e
Fix documentation typo
...
Fix typo "dervied" -> "derived".
2016-01-30 18:35:52 -02:00
Shawn Smith
1ea597af03
typo
2016-01-22 08:36:40 -08:00
Daniel Souza
6a70b0ec98
altered uuid.Scan() so that it allows for empty UUIDs to be read properly (returning a null UUID value)
2016-01-21 23:52:00 -05:00
Shawn Smith
fe04eb6d8d
fix typo
2015-12-31 15:05:18 +09:00
pborman
dee7705ef7
Merge pull request #15 from jboverfelt/sql-byte-scan
...
Attempt to scan []byte uuids larger than 16 bytes. Fixes #12
2015-12-15 07:05:54 -08:00
Justin Overfelt
d4a682d48d
Attempt to scan []byte uuids larger than 16 bytes. Fixes #12
2015-11-18 19:54:10 -05:00
Bryan Matsuo
1c7b0fea16
opitimize json interface methods
...
A common helper function is used for UUID.String(), UUID.URN(), and
UUID.MarshalJSON(). Any perforance hit in UUID.String() and
UUID.Marshal() appears to be negligable. The benefit to
UUID.MarshalJSON() is several hundred nanoseconds (23% faster) and 2
allocations (21% fewer bytes).
Some redundant checks are removed from UUID.UnmarshalJSON() method. The
"encoding/json".Unmarshaler interface specifies that implementations can
assume input is valid JSON content. This allows one to assume that (1)
input is not empty and (2) if index 0 is a quote, then the content is a
json string and the last index will contain a terminating quote. The
second point is not completely explicit in the documentation but it is
true in practice (and it is safe to assume -- errors will be caught).
2015-10-10 22:08:33 -07:00
Bryan Matsuo
0ec82b41c6
remove redundant nil checks in UUID.String() and UUID.URN()
2015-10-10 21:41:29 -07:00
Bryan Matsuo
9e4836cc57
do not use fmt.Sprintf() in UUID.URN()
...
The procedure is the same as UUID.String() (see f4e3abb). Code is not
shared to ensure that unnecessary bounds checks do not occur.
2015-10-10 21:41:29 -07:00
Bryan Matsuo
71fb85a64c
do not use fmt.Sprintf() in UUID.String()
...
A single array is used as a buffer and "encoding/hex".Encode() hex
encodes directly its final destination. Loops are avoided because they
are simple enough to unroll manually.
2015-10-10 21:41:29 -07:00
Bryan Matsuo
4e1e17316e
use arrays in Parse() for reduced allocation cost and bounds checks
...
An array is also for hex digit value lookups which seemed to reliably
give a few ns reduction in time.
2015-10-10 21:12:40 -07:00
Bryan Matsuo
baeec2195c
benchmarks for Parse(), New(), String(), URN(), MarshalJSON, UnmarshalJSON()
...
There are no parse modifications yet. This allows a benchmark to be
established for later commits.
2015-10-10 21:12:07 -07:00
pborman
cccd189d45
Merge pull request #6 from jboverfelt/sql-scanner
...
Implement database/sql's Scanner interface. Fixes #5
2015-08-24 14:28:02 -07:00
Justin Overfelt
7464a2351d
Implement database/sql's Scanner interface. Fixes #5
2015-08-24 16:47:56 -04:00
Mawueli Kofi Adzoe
47b178d76c
Create README.md
2015-07-17 14:13:31 +00:00
Paul Borman
ca53cad383
Remove unneeded lib directory
2015-06-03 14:40:16 -07:00
Paul Borman
2a573a0b4d
Move code up one directory
2015-06-03 14:39:07 -07:00
Paul Borman
ed3ca8a15a
go-uuid: Fix JSON encoding for empty UUIDs
2014-12-02 10:54:02 -06:00
Paul Borman
e1a3bdbdba
Actually include the clock_seq fix
2014-12-01 10:02:42 -08:00
Paul Borman
20e286fb8b
Hopefully actually add the new json files and seq_test.go file.
2014-12-01 09:59:57 -08:00
Paul Borman
bd9fbafc7a
Cleanup
2014-04-14 13:07:31 -07:00
Paul Borman
cf8abfc1a1
Add locking around global time functions.
2014-04-14 13:05:23 -07:00
David Symonds
0b37a59742
go-uuid: Make uuid_test.go independent of the system clock.
...
The test depends on an advancing clock, but it can sometimes run
fast enough that the clock has not advanced.
R=borman
CC=borman
http://codereview.appspot.com/6243069
Committer: Paul Borman <borman@google.com>
2012-06-05 07:45:31 -07:00
David Symonds
7fc15a0835
go-uuid: Update to Go 1.
...
R=borman
CC=borman
http://codereview.appspot.com/6255058
Committer: Paul Borman <borman@google.com>
2012-05-29 18:05:31 -05:00
Paul Borman
1da9265622
uuid: format fix
...
R=paul
CC=borman
http://codereview.appspot.com/4854050
2011-08-10 15:23:39 -07:00
Paul Borman
fccedfff98
uuid: fix comments
...
R=ajrisi
CC=borman
http://codereview.appspot.com/4819072
2011-08-10 15:21:56 -07:00
Paul Borman
3943dc54a8
uuid: clean to use more idiomatic names
...
Convert constants to more Go like names (e.g,. DOMAIN_PERSON -> Person)
Use the hash.Hash interface instead of our own.
R=rcs
CC=borman
http://codereview.appspot.com/4832058
2011-08-09 17:20:55 -07:00
Paul Borman
e8fc8707cf
Update the doc line.
2011-08-08 23:14:13 -07:00
Paul Borman
42c4e65571
uuid: add doc.go file
...
R=paul
CC=borman
http://codereview.appspot.com/4856045
2011-08-08 21:13:39 -07:00
Paul Borman
94eed3bb75
uuid: remove unneeded top level makefile
...
R=paul
CC=borman
http://codereview.appspot.com/4798074
2011-08-08 14:39:32 -07:00
Paul Borman
808d470594
uuid: source re-organization
...
Move source to uuid subdirectory.
Add in coderviewability.
R=rsc
CC=borman
http://codereview.appspot.com/4838053
2011-08-08 14:34:29 -07:00
Paul Borman
e130d97558
Initial checking of the go-uuid code.
2011-08-08 11:45:10 -07:00