summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/pborman
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-09-23 10:17:51 -0400
committerGitHub <noreply@github.com>2016-09-23 10:17:51 -0400
commit2ca0e8f9a0f9863555a26e984cde15efff9ef8f8 (patch)
treedaae1ee67b14a3d0a84424f2a304885d9e75ce2b /vendor/github.com/pborman
parent6d62d65b2dc85855aabea036cbd44f6059e19d13 (diff)
downloadchat-2ca0e8f9a0f9863555a26e984cde15efff9ef8f8.tar.gz
chat-2ca0e8f9a0f9863555a26e984cde15efff9ef8f8.tar.bz2
chat-2ca0e8f9a0f9863555a26e984cde15efff9ef8f8.zip
Updating golang dependancies (#4075)
Diffstat (limited to 'vendor/github.com/pborman')
-rw-r--r--vendor/github.com/pborman/uuid/CONTRIBUTING.md10
-rw-r--r--vendor/github.com/pborman/uuid/sql.go8
-rw-r--r--vendor/github.com/pborman/uuid/sql_test.go9
-rw-r--r--vendor/github.com/pborman/uuid/uuid.go25
-rw-r--r--vendor/github.com/pborman/uuid/uuid_test.go74
5 files changed, 1 insertions, 125 deletions
diff --git a/vendor/github.com/pborman/uuid/CONTRIBUTING.md b/vendor/github.com/pborman/uuid/CONTRIBUTING.md
deleted file mode 100644
index 04fdf09f1..000000000
--- a/vendor/github.com/pborman/uuid/CONTRIBUTING.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# How to contribute
-
-We definitely welcome patches and contribution to this project!
-
-### Legal requirements
-
-In order to protect both you and ourselves, you will need to sign the
-[Contributor License Agreement](https://cla.developers.google.com/clas).
-
-You may have already signed it for other Google projects.
diff --git a/vendor/github.com/pborman/uuid/sql.go b/vendor/github.com/pborman/uuid/sql.go
index d015bfd13..c84f900d5 100644
--- a/vendor/github.com/pborman/uuid/sql.go
+++ b/vendor/github.com/pborman/uuid/sql.go
@@ -5,7 +5,6 @@
package uuid
import (
- "database/sql/driver"
"errors"
"fmt"
)
@@ -57,10 +56,3 @@ func (uuid *UUID) Scan(src interface{}) error {
return nil
}
-
-// Value implements sql.Valuer so that UUIDs can be written to databases
-// transparently. Currently, UUIDs map to strings. Please consult
-// database-specific driver documentation for matching types.
-func (uuid UUID) Value() (driver.Value, error) {
- return uuid.String(), nil
-}
diff --git a/vendor/github.com/pborman/uuid/sql_test.go b/vendor/github.com/pborman/uuid/sql_test.go
index 103095156..4d26392af 100644
--- a/vendor/github.com/pborman/uuid/sql_test.go
+++ b/vendor/github.com/pborman/uuid/sql_test.go
@@ -85,12 +85,3 @@ func TestScan(t *testing.T) {
t.Error("UUID was not nil after scanning empty string")
}
}
-
-func TestValue(t *testing.T) {
- stringTest := "f47ac10b-58cc-0372-8567-0e02b2c3d479"
- uuid := Parse(stringTest)
- val, _ := uuid.Value()
- if val != stringTest {
- t.Error("Value() did not return expected string")
- }
-}
diff --git a/vendor/github.com/pborman/uuid/uuid.go b/vendor/github.com/pborman/uuid/uuid.go
index 82c9e7ee7..c4482cd87 100644
--- a/vendor/github.com/pborman/uuid/uuid.go
+++ b/vendor/github.com/pborman/uuid/uuid.go
@@ -13,20 +13,6 @@ import (
"strings"
)
-// Array is a pass-by-value UUID that can be used as an effecient key in a map.
-type Array [16]byte
-
-// UUID converts uuid into a slice.
-func (uuid Array) UUID() UUID {
- return uuid[:]
-}
-
-// String returns the string representation of uuid,
-// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
-func (uuid Array) String() string {
- return uuid.UUID().String()
-}
-
// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC
// 4122.
type UUID []byte
@@ -90,17 +76,6 @@ func Equal(uuid1, uuid2 UUID) bool {
return bytes.Equal(uuid1, uuid2)
}
-// Array returns an array representation of uuid that can be used as a map key.
-// Array panics if uuid is not valid.
-func (uuid UUID) Array() Array {
- if len(uuid) != 16 {
- panic("invalid uuid")
- }
- var a Array
- copy(a[:], uuid)
- return a
-}
-
// String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// , or "" if uuid is invalid.
func (uuid UUID) String() string {
diff --git a/vendor/github.com/pborman/uuid/uuid_test.go b/vendor/github.com/pborman/uuid/uuid_test.go
index cb1cd5cf9..3835cc808 100644
--- a/vendor/github.com/pborman/uuid/uuid_test.go
+++ b/vendor/github.com/pborman/uuid/uuid_test.go
@@ -300,7 +300,7 @@ func TestNode(t *testing.T) {
t.Error("nodeid is all zeros")
}
- id := []byte{1, 2, 3, 4, 5, 6, 7, 8}
+ id := []byte{1,2,3,4,5,6,7,8}
SetNodeID(id)
ni = NodeID()
if !bytes.Equal(ni, id[:6]) {
@@ -431,40 +431,6 @@ func TestBadRand(t *testing.T) {
}
}
-func TestUUID_Array(t *testing.T) {
- expect := Array{
- 0xf4, 0x7a, 0xc1, 0x0b,
- 0x58, 0xcc,
- 0x03, 0x72,
- 0x85, 0x67,
- 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79,
- }
- uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
- if uuid == nil {
- t.Fatal("invalid uuid")
- }
- if uuid.Array() != expect {
- t.Fatal("invalid array")
- }
-}
-
-func TestArray_UUID(t *testing.T) {
- array := Array{
- 0xf4, 0x7a, 0xc1, 0x0b,
- 0x58, 0xcc,
- 0x03, 0x72,
- 0x85, 0x67,
- 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79,
- }
- expect := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
- if expect == nil {
- t.Fatal("invalid uuid")
- }
- if !bytes.Equal(array.UUID(), expect) {
- t.Fatal("invalid uuid")
- }
-}
-
func BenchmarkParse(b *testing.B) {
for i := 0; i < b.N; i++ {
uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
@@ -503,41 +469,3 @@ func BenchmarkUUID_URN(b *testing.B) {
}
}
}
-
-func BenchmarkUUID_Array(b *testing.B) {
- expect := Array{
- 0xf4, 0x7a, 0xc1, 0x0b,
- 0x58, 0xcc,
- 0x03, 0x72,
- 0x85, 0x67,
- 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79,
- }
- uuid := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
- if uuid == nil {
- b.Fatal("invalid uuid")
- }
- for i := 0; i < b.N; i++ {
- if uuid.Array() != expect {
- b.Fatal("invalid array")
- }
- }
-}
-
-func BenchmarkArray_UUID(b *testing.B) {
- array := Array{
- 0xf4, 0x7a, 0xc1, 0x0b,
- 0x58, 0xcc,
- 0x03, 0x72,
- 0x85, 0x67,
- 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79,
- }
- expect := Parse("f47ac10b-58cc-0372-8567-0e02b2c3d479")
- if expect == nil {
- b.Fatal("invalid uuid")
- }
- for i := 0; i < b.N; i++ {
- if !bytes.Equal(array.UUID(), expect) {
- b.Fatal("invalid uuid")
- }
- }
-}