@cryptotaxi247 / kubo / commits / 2c6213e24

Migrate go.uuid to gx from Godeps

License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

Jakub Sztandera committed May 18, 2016 at 22:52 UTC 2c6213e246fe6d45e651893202da7d1eeb3736fe
11 files changed +8 -1101
Godeps/Godeps.json
-4
@@ -156,10 +156,6 @@
156 "ImportPath": "github.com/rs/cors",
157 "Rev": "5e4ce6bc0ecd3472f6f943666d84876691be2ced"
158 },
159 - {
160 - "ImportPath": "github.com/satori/go.uuid",
161 - "Rev": "7c7f2020c4c9491594b85767967f4619c2fa75f9"
162 - },
159 {
160 "ImportPath": "github.com/steakknife/hamming",
161 "Comment": "0.0.10",
Godeps/_workspace/src/github.com/ipfs/go-datastore/Godeps/Godeps.json
-4
@@ -55,10 +55,6 @@
55 "ImportPath": "github.com/mattbaird/elastigo/core",
56 "Rev": "041b88c1fcf6489a5721ede24378ce1253b9159d"
57 },
58 - {
59 - "ImportPath": "github.com/satori/go.uuid",
60 - "Rev": "7c7f2020c4c9491594b85767967f4619c2fa75f9"
61 - },
58 {
59 "ImportPath": "github.com/syndtr/goleveldb/leveldb",
60 "Rev": "871eee0a7546bb7d1b2795142e29c4534abc49b3"
Godeps/_workspace/src/github.com/ipfs/go-datastore/key.go
+1 -1
@@ -4,7 +4,7 @@ import (
4 "path"
5 "strings"
6
7 - "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/satori/go.uuid"
7 + "gx/ipfs/QmcyaFHbyiZfoX5GTpcqqCPYmbjYNAhRDekXSJPFHdYNSV/go.uuid"
8
9 dsq "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/query"
10 )
Godeps/_workspace/src/github.com/satori/go.uuid/.travis.yml deleted
-10
@@ -1,10 +0,0 @@
1 -language: go
2 -go:
3 - - 1.0
4 - - 1.1
5 - - 1.2
6 - - 1.3
7 - - 1.4
8 -sudo: false
9 -notifications:
10 - email: false
Godeps/_workspace/src/github.com/satori/go.uuid/LICENSE deleted
-20
@@ -1,20 +0,0 @@
1 -Copyright (C) 2013-2015 by Maxim Bublis <b@codemonkey.ru>
2 -
3 -Permission is hereby granted, free of charge, to any person obtaining
4 -a copy of this software and associated documentation files (the
5 -"Software"), to deal in the Software without restriction, including
6 -without limitation the rights to use, copy, modify, merge, publish,
7 -distribute, sublicense, and/or sell copies of the Software, and to
8 -permit persons to whom the Software is furnished to do so, subject to
9 -the following conditions:
10 -
11 -The above copyright notice and this permission notice shall be
12 -included in all copies or substantial portions of the Software.
13 -
14 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Godeps/_workspace/src/github.com/satori/go.uuid/README.md deleted
-66
@@ -1,66 +0,0 @@
1 -# UUID package for Go language
2 -
3 -[![Build Status](https://travis-ci.org/satori/go.uuid.png?branch=master)](https://travis-ci.org/satori/go.uuid)
4 -[![GoDoc](http://godoc.org/github.com/satori/go.uuid?status.png)](http://godoc.org/github.com/satori/go.uuid)
5 -
6 -This package provides pure Go implementation of Universally Unique Identifier (UUID). Supported both creation and parsing of UUIDs.
7 -
8 -With 100% test coverage and benchmarks out of box.
9 -
10 -Supported versions:
11 -* Version 1, based on timestamp and MAC address (RFC 4122)
12 -* Version 2, based on timestamp, MAC address and POSIX UID/GID (DCE 1.1)
13 -* Version 3, based on MD5 hashing (RFC 4122)
14 -* Version 4, based on random numbers (RFC 4122)
15 -* Version 5, based on SHA-1 hashing (RFC 4122)
16 -
17 -## Installation
18 -
19 -Use the `go` command:
20 -
21 - $ go get github.com/satori/go.uuid
22 -
23 -## Requirements
24 -
25 -UUID package requires any stable version of Go Programming Language.
26 -
27 -It is tested against following versions of Go: 1.0-1.4
28 -
29 -## Example
30 -
31 -```go
32 -package main
33 -
34 -import (
35 - "fmt"
36 - "github.com/satori/go.uuid"
37 -)
38 -
39 -func main() {
40 - // Creating UUID Version 4
41 - u1 := uuid.NewV4()
42 - fmt.Printf("UUIDv4: %s\n", u1)
43 -
44 - // Parsing UUID from string input
45 - u2, err := uuid.FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
46 - if err != nil {
47 - fmt.Printf("Something gone wrong: %s", err)
48 - }
49 - fmt.Printf("Successfully parsed: %s", u2)
50 -}
51 -```
52 -
53 -## Documentation
54 -
55 -[Documentation](http://godoc.org/github.com/satori/go.uuid) is hosted at GoDoc project.
56 -
57 -## Links
58 -* [RFC 4122](http://tools.ietf.org/html/rfc4122)
59 -* [DCE 1.1: Authentication and Security Services](http://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01)
60 -
61 -## Copyright
62 -
63 -Copyright (C) 2013-2015 by Maxim Bublis <b@codemonkey.ru>.
64 -
65 -UUID package released under MIT License.
66 -See [LICENSE](https://github.com/satori/go.uuid/blob/master/LICENSE) for details.
Godeps/_workspace/src/github.com/satori/go.uuid/benchmarks_test.go deleted
-121
@@ -1,121 +0,0 @@
1 -// Copyright (C) 2013-2014 by Maxim Bublis <b@codemonkey.ru>
2 -//
3 -// Permission is hereby granted, free of charge, to any person obtaining
4 -// a copy of this software and associated documentation files (the
5 -// "Software"), to deal in the Software without restriction, including
6 -// without limitation the rights to use, copy, modify, merge, publish,
7 -// distribute, sublicense, and/or sell copies of the Software, and to
8 -// permit persons to whom the Software is furnished to do so, subject to
9 -// the following conditions:
10 -//
11 -// The above copyright notice and this permission notice shall be
12 -// included in all copies or substantial portions of the Software.
13 -//
14 -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 -
22 -package uuid
23 -
24 -import (
25 - "testing"
26 -)
27 -
28 -func BenchmarkFromBytes(b *testing.B) {
29 - bytes := []byte{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
30 - for i := 0; i < b.N; i++ {
31 - FromBytes(bytes)
32 - }
33 -}
34 -
35 -func BenchmarkFromString(b *testing.B) {
36 - s := "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
37 - for i := 0; i < b.N; i++ {
38 - FromString(s)
39 - }
40 -}
41 -
42 -func BenchmarkFromStringUrn(b *testing.B) {
43 - s := "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8"
44 - for i := 0; i < b.N; i++ {
45 - FromString(s)
46 - }
47 -}
48 -
49 -func BenchmarkFromStringWithBrackets(b *testing.B) {
50 - s := "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}"
51 - for i := 0; i < b.N; i++ {
52 - FromString(s)
53 - }
54 -}
55 -
56 -func BenchmarkNewV1(b *testing.B) {
57 - for i := 0; i < b.N; i++ {
58 - NewV1()
59 - }
60 -}
61 -
62 -func BenchmarkNewV2(b *testing.B) {
63 - for i := 0; i < b.N; i++ {
64 - NewV2(DomainPerson)
65 - }
66 -}
67 -
68 -func BenchmarkNewV3(b *testing.B) {
69 - for i := 0; i < b.N; i++ {
70 - NewV3(NamespaceDNS, "www.example.com")
71 - }
72 -}
73 -
74 -func BenchmarkNewV4(b *testing.B) {
75 - for i := 0; i < b.N; i++ {
76 - NewV4()
77 - }
78 -}
79 -
80 -func BenchmarkNewV5(b *testing.B) {
81 - for i := 0; i < b.N; i++ {
82 - NewV5(NamespaceDNS, "www.example.com")
83 - }
84 -}
85 -
86 -func BenchmarkMarshalBinary(b *testing.B) {
87 - u := NewV4()
88 - for i := 0; i < b.N; i++ {
89 - u.MarshalBinary()
90 - }
91 -}
92 -
93 -func BenchmarkMarshalText(b *testing.B) {
94 - u := NewV4()
95 - for i := 0; i < b.N; i++ {
96 - u.MarshalText()
97 - }
98 -}
99 -
100 -func BenchmarkUnmarshalBinary(b *testing.B) {
101 - bytes := []byte{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
102 - u := UUID{}
103 - for i := 0; i < b.N; i++ {
104 - u.UnmarshalBinary(bytes)
105 - }
106 -}
107 -
108 -func BenchmarkUnmarshalText(b *testing.B) {
109 - bytes := []byte("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
110 - u := UUID{}
111 - for i := 0; i < b.N; i++ {
112 - u.UnmarshalText(bytes)
113 - }
114 -}
115 -
116 -func BenchmarkMarshalToString(b *testing.B) {
117 - u := NewV4()
118 - for i := 0; i < b.N; i++ {
119 - u.String()
120 - }
121 -}
Godeps/_workspace/src/github.com/satori/go.uuid/uuid.go deleted
-397
@@ -1,397 +0,0 @@
1 -// Copyright (C) 2013-2015 by Maxim Bublis <b@codemonkey.ru>
2 -//
3 -// Permission is hereby granted, free of charge, to any person obtaining
4 -// a copy of this software and associated documentation files (the
5 -// "Software"), to deal in the Software without restriction, including
6 -// without limitation the rights to use, copy, modify, merge, publish,
7 -// distribute, sublicense, and/or sell copies of the Software, and to
8 -// permit persons to whom the Software is furnished to do so, subject to
9 -// the following conditions:
10 -//
11 -// The above copyright notice and this permission notice shall be
12 -// included in all copies or substantial portions of the Software.
13 -//
14 -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 -
22 -// Package uuid provides implementation of Universally Unique Identifier (UUID).
23 -// Supported versions are 1, 3, 4 and 5 (as specified in RFC 4122) and
24 -// version 2 (as specified in DCE 1.1).
25 -package uuid
26 -
27 -import (
28 - "bytes"
29 - "crypto/md5"
30 - "crypto/rand"
31 - "crypto/sha1"
32 - "encoding/binary"
33 - "encoding/hex"
34 - "fmt"
35 - "hash"
36 - "net"
37 - "os"
38 - "sync"
39 - "time"
40 -)
41 -
42 -// UUID layout variants.
43 -const (
44 - VariantNCS = iota
45 - VariantRFC4122
46 - VariantMicrosoft
47 - VariantFuture
48 -)
49 -
50 -// UUID DCE domains.
51 -const (
52 - DomainPerson = iota
53 - DomainGroup
54 - DomainOrg
55 -)
56 -
57 -// Difference in 100-nanosecond intervals between
58 -// UUID epoch (October 15, 1582) and Unix epoch (January 1, 1970).
59 -const epochStart = 122192928000000000
60 -
61 -// Used in string method conversion
62 -const dash byte = '-'
63 -
64 -// UUID v1/v2 storage.
65 -var (
66 - storageMutex sync.Mutex
67 - clockSequence uint16
68 - lastTime uint64
69 - hardwareAddr [6]byte
70 - posixUID = uint32(os.Getuid())
71 - posixGID = uint32(os.Getgid())
72 -)
73 -
74 -// String parse helpers.
75 -var (
76 - urnPrefix = []byte("urn:uuid:")
77 - byteGroups = []int{8, 4, 4, 4, 12}
78 -)
79 -
80 -// Epoch calculation function
81 -var epochFunc func() uint64
82 -
83 -// Initialize storage
84 -func init() {
85 - buf := make([]byte, 2)
86 - rand.Read(buf)
87 - clockSequence = binary.BigEndian.Uint16(buf)
88 -
89 - // Initialize hardwareAddr randomly in case
90 - // of real network interfaces absence
91 - rand.Read(hardwareAddr[:])
92 -
93 - // Set multicast bit as recommended in RFC 4122
94 - hardwareAddr[0] |= 0x01
95 -
96 - interfaces, err := net.Interfaces()
97 - if err == nil {
98 - for _, iface := range interfaces {
99 - if len(iface.HardwareAddr) >= 6 {
100 - copy(hardwareAddr[:], iface.HardwareAddr)
101 - break
102 - }
103 - }
104 - }
105 - epochFunc = unixTimeFunc
106 -}
107 -
108 -// Returns difference in 100-nanosecond intervals between
109 -// UUID epoch (October 15, 1582) and current time.
110 -// This is default epoch calculation function.
111 -func unixTimeFunc() uint64 {
112 - return epochStart + uint64(time.Now().UnixNano()/100)
113 -}
114 -
115 -// UUID representation compliant with specification
116 -// described in RFC 4122.
117 -type UUID [16]byte
118 -
119 -// The nil UUID is special form of UUID that is specified to have all
120 -// 128 bits set to zero.
121 -var Nil = UUID{}
122 -
123 -// Predefined namespace UUIDs.
124 -var (
125 - NamespaceDNS, _ = FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
126 - NamespaceURL, _ = FromString("6ba7b811-9dad-11d1-80b4-00c04fd430c8")
127 - NamespaceOID, _ = FromString("6ba7b812-9dad-11d1-80b4-00c04fd430c8")
128 - NamespaceX500, _ = FromString("6ba7b814-9dad-11d1-80b4-00c04fd430c8")
129 -)
130 -
131 -// And returns result of binary AND of two UUIDs.
132 -func And(u1 UUID, u2 UUID) UUID {
133 - u := UUID{}
134 - for i := 0; i < 16; i++ {
135 - u[i] = u1[i] & u2[i]
136 - }
137 - return u
138 -}
139 -
140 -// Or returns result of binary OR of two UUIDs.
141 -func Or(u1 UUID, u2 UUID) UUID {
142 - u := UUID{}
143 - for i := 0; i < 16; i++ {
144 - u[i] = u1[i] | u2[i]
145 - }
146 - return u
147 -}
148 -
149 -// Equal returns true if u1 and u2 equals, otherwise returns false.
150 -func Equal(u1 UUID, u2 UUID) bool {
151 - return bytes.Equal(u1[:], u2[:])
152 -}
153 -
154 -// Version returns algorithm version used to generate UUID.
155 -func (u UUID) Version() uint {
156 - return uint(u[6] >> 4)
157 -}
158 -
159 -// Variant returns UUID layout variant.
160 -func (u UUID) Variant() uint {
161 - switch {
162 - case (u[8] & 0x80) == 0x00:
163 - return VariantNCS
164 - case (u[8]&0xc0)|0x80 == 0x80:
165 - return VariantRFC4122
166 - case (u[8]&0xe0)|0xc0 == 0xc0:
167 - return VariantMicrosoft
168 - }
169 - return VariantFuture
170 -}
171 -
172 -// Bytes returns bytes slice representation of UUID.
173 -func (u UUID) Bytes() []byte {
174 - return u[:]
175 -}
176 -
177 -// Returns canonical string representation of UUID:
178 -// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
179 -func (u UUID) String() string {
180 - buf := make([]byte, 36)
181 -
182 - hex.Encode(buf[0:8], u[0:4])
183 - buf[8] = dash
184 - hex.Encode(buf[9:13], u[4:6])
185 - buf[13] = dash
186 - hex.Encode(buf[14:18], u[6:8])
187 - buf[18] = dash
188 - hex.Encode(buf[19:23], u[8:10])
189 - buf[23] = dash
190 - hex.Encode(buf[24:], u[10:])
191 -
192 - return string(buf)
193 -}
194 -
195 -// SetVersion sets version bits.
196 -func (u *UUID) SetVersion(v byte) {
197 - u[6] = (u[6] & 0x0f) | (v << 4)
198 -}
199 -
200 -// SetVariant sets variant bits as described in RFC 4122.
201 -func (u *UUID) SetVariant() {
202 - u[8] = (u[8] & 0xbf) | 0x80
203 -}
204 -
205 -// MarshalText implements the encoding.TextMarshaler interface.
206 -// The encoding is the same as returned by String.
207 -func (u UUID) MarshalText() (text []byte, err error) {
208 - text = []byte(u.String())
209 - return
210 -}
211 -
212 -// UnmarshalText implements the encoding.TextUnmarshaler interface.
213 -// Following formats are supported:
214 -// "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
215 -// "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}",
216 -// "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8"
217 -func (u *UUID) UnmarshalText(text []byte) (err error) {
218 - if len(text) < 32 {
219 - err = fmt.Errorf("uuid: invalid UUID string: %s", text)
220 - return
221 - }
222 -
223 - if bytes.Equal(text[:9], urnPrefix) {
224 - text = text[9:]
225 - } else if text[0] == '{' {
226 - text = text[1:]
227 - }
228 -
229 - b := u[:]
230 -
231 - for _, byteGroup := range byteGroups {
232 - if text[0] == '-' {
233 - text = text[1:]
234 - }
235 -
236 - _, err = hex.Decode(b[:byteGroup/2], text[:byteGroup])
237 -
238 - if err != nil {
239 - return
240 - }
241 -
242 - text = text[byteGroup:]
243 - b = b[byteGroup/2:]
244 - }
245 -
246 - return
247 -}
248 -
249 -// MarshalBinary implements the encoding.BinaryMarshaler interface.
250 -func (u UUID) MarshalBinary() (data []byte, err error) {
251 - data = u.Bytes()
252 - return
253 -}
254 -
255 -// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
256 -// It will return error if the slice isn't 16 bytes long.
257 -func (u *UUID) UnmarshalBinary(data []byte) (err error) {
258 - if len(data) != 16 {
259 - err = fmt.Errorf("uuid: UUID must be exactly 16 bytes long, got %d bytes", len(data))
260 - return
261 - }
262 - copy(u[:], data)
263 -
264 - return
265 -}
266 -
267 -// Scan implements the sql.Scanner interface.
268 -// A 16-byte slice is handled by UnmarshalBinary, while
269 -// a longer byte slice or a string is handled by UnmarshalText.
270 -func (u *UUID) Scan(src interface{}) error {
271 - switch src := src.(type) {
272 - case []byte:
273 - if len(src) == 16 {
274 - return u.UnmarshalBinary(src)
275 - }
276 - return u.UnmarshalText(src)
277 -
278 - case string:
279 - return u.UnmarshalText([]byte(src))
280 - }
281 -
282 - return fmt.Errorf("uuid: cannot convert %T to UUID", src)
283 -}
284 -
285 -// FromBytes returns UUID converted from raw byte slice input.
286 -// It will return error if the slice isn't 16 bytes long.
287 -func FromBytes(input []byte) (u UUID, err error) {
288 - err = u.UnmarshalBinary(input)
289 - return
290 -}
291 -
292 -// FromString returns UUID parsed from string input.
293 -// Input is expected in a form accepted by UnmarshalText.
294 -func FromString(input string) (u UUID, err error) {
295 - err = u.UnmarshalText([]byte(input))
296 - return
297 -}
298 -
299 -// Returns UUID v1/v2 storage state.
300 -// Returns epoch timestamp and clock sequence.
301 -func getStorage() (uint64, uint16) {
302 - storageMutex.Lock()
303 - defer storageMutex.Unlock()
304 -
305 - timeNow := epochFunc()
306 - // Clock changed backwards since last UUID generation.
307 - // Should increase clock sequence.
308 - if timeNow <= lastTime {
309 - clockSequence++
310 - }
311 - lastTime = timeNow
312 -
313 - return timeNow, clockSequence
314 -}
315 -
316 -// NewV1 returns UUID based on current timestamp and MAC address.
317 -func NewV1() UUID {
318 - u := UUID{}
319 -
320 - timeNow, clockSeq := getStorage()
321 -
322 - binary.BigEndian.PutUint32(u[0:], uint32(timeNow))
323 - binary.BigEndian.PutUint16(u[4:], uint16(timeNow>>32))
324 - binary.BigEndian.PutUint16(u[6:], uint16(timeNow>>48))
325 - binary.BigEndian.PutUint16(u[8:], clockSeq)
326 -
327 - copy(u[10:], hardwareAddr[:])
328 -
329 - u.SetVersion(1)
330 - u.SetVariant()
331 -
332 - return u
333 -}
334 -
335 -// NewV2 returns DCE Security UUID based on POSIX UID/GID.
336 -func NewV2(domain byte) UUID {
337 - u := UUID{}
338 -
339 - switch domain {
340 - case DomainPerson:
341 - binary.BigEndian.PutUint32(u[0:], posixUID)
342 - case DomainGroup:
343 - binary.BigEndian.PutUint32(u[0:], posixGID)
344 - }
345 -
346 - timeNow, clockSeq := getStorage()
347 -
348 - binary.BigEndian.PutUint16(u[4:], uint16(timeNow>>32))
349 - binary.BigEndian.PutUint16(u[6:], uint16(timeNow>>48))
350 - binary.BigEndian.PutUint16(u[8:], clockSeq)
351 - u[9] = domain
352 -
353 - copy(u[10:], hardwareAddr[:])
354 -
355 - u.SetVersion(2)
356 - u.SetVariant()
357 -
358 - return u
359 -}
360 -
361 -// NewV3 returns UUID based on MD5 hash of namespace UUID and name.
362 -func NewV3(ns UUID, name string) UUID {
363 - u := newFromHash(md5.New(), ns, name)
364 - u.SetVersion(3)
365 - u.SetVariant()
366 -
367 - return u
368 -}
369 -
370 -// NewV4 returns random generated UUID.
371 -func NewV4() UUID {
372 - u := UUID{}
373 - rand.Read(u[:])
374 - u.SetVersion(4)
375 - u.SetVariant()
376 -
377 - return u
378 -}
379 -
380 -// NewV5 returns UUID based on SHA-1 hash of namespace UUID and name.
381 -func NewV5(ns UUID, name string) UUID {
382 - u := newFromHash(sha1.New(), ns, name)
383 - u.SetVersion(5)
384 - u.SetVariant()
385 -
386 - return u
387 -}
388 -
389 -// Returns UUID based on hashing of namespace UUID and name.
390 -func newFromHash(h hash.Hash, ns UUID, name string) UUID {
391 - u := UUID{}
392 - h.Write(ns[:])
393 - h.Write([]byte(name))
394 - copy(u[:], h.Sum(nil))
395 -
396 - return u
397 -}
Godeps/_workspace/src/github.com/satori/go.uuid/uuid_test.go deleted
-477
@@ -1,477 +0,0 @@
1 -// Copyright (C) 2013, 2015 by Maxim Bublis <b@codemonkey.ru>
2 -//
3 -// Permission is hereby granted, free of charge, to any person obtaining
4 -// a copy of this software and associated documentation files (the
5 -// "Software"), to deal in the Software without restriction, including
6 -// without limitation the rights to use, copy, modify, merge, publish,
7 -// distribute, sublicense, and/or sell copies of the Software, and to
8 -// permit persons to whom the Software is furnished to do so, subject to
9 -// the following conditions:
10 -//
11 -// The above copyright notice and this permission notice shall be
12 -// included in all copies or substantial portions of the Software.
13 -//
14 -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 -
22 -package uuid
23 -
24 -import (
25 - "bytes"
26 - "testing"
27 -)
28 -
29 -func TestBytes(t *testing.T) {
30 - u := UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
31 -
32 - bytes1 := []byte{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
33 -
34 - if !bytes.Equal(u.Bytes(), bytes1) {
35 - t.Errorf("Incorrect bytes representation for UUID: %s", u)
36 - }
37 -}
38 -
39 -func TestString(t *testing.T) {
40 - if NamespaceDNS.String() != "6ba7b810-9dad-11d1-80b4-00c04fd430c8" {
41 - t.Errorf("Incorrect string representation for UUID: %s", NamespaceDNS.String())
42 - }
43 -}
44 -
45 -func TestEqual(t *testing.T) {
46 - if !Equal(NamespaceDNS, NamespaceDNS) {
47 - t.Errorf("Incorrect comparison of %s and %s", NamespaceDNS, NamespaceDNS)
48 - }
49 -
50 - if Equal(NamespaceDNS, NamespaceURL) {
51 - t.Errorf("Incorrect comparison of %s and %s", NamespaceDNS, NamespaceURL)
52 - }
53 -}
54 -
55 -func TestOr(t *testing.T) {
56 - u1 := UUID{0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff}
57 - u2 := UUID{0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00}
58 -
59 - u := UUID{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
60 -
61 - if !Equal(u, Or(u1, u2)) {
62 - t.Errorf("Incorrect bitwise OR result %s", Or(u1, u2))
63 - }
64 -}
65 -
66 -func TestAnd(t *testing.T) {
67 - u1 := UUID{0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff}
68 - u2 := UUID{0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00}
69 -
70 - u := UUID{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
71 -
72 - if !Equal(u, And(u1, u2)) {
73 - t.Errorf("Incorrect bitwise AND result %s", And(u1, u2))
74 - }
75 -}
76 -
77 -func TestVersion(t *testing.T) {
78 - u := UUID{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
79 -
80 - if u.Version() != 1 {
81 - t.Errorf("Incorrect version for UUID: %d", u.Version())
82 - }
83 -}
84 -
85 -func TestSetVersion(t *testing.T) {
86 - u := UUID{}
87 - u.SetVersion(4)
88 -
89 - if u.Version() != 4 {
90 - t.Errorf("Incorrect version for UUID after u.setVersion(4): %d", u.Version())
91 - }
92 -}
93 -
94 -func TestVariant(t *testing.T) {
95 - u1 := UUID{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
96 -
97 - if u1.Variant() != VariantNCS {
98 - t.Errorf("Incorrect variant for UUID variant %d: %d", VariantNCS, u1.Variant())
99 - }
100 -
101 - u2 := UUID{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
102 -
103 - if u2.Variant() != VariantRFC4122 {
104 - t.Errorf("Incorrect variant for UUID variant %d: %d", VariantRFC4122, u2.Variant())
105 - }
106 -
107 - u3 := UUID{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
108 -
109 - if u3.Variant() != VariantMicrosoft {
110 - t.Errorf("Incorrect variant for UUID variant %d: %d", VariantMicrosoft, u3.Variant())
111 - }
112 -
113 - u4 := UUID{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
114 -
115 - if u4.Variant() != VariantFuture {
116 - t.Errorf("Incorrect variant for UUID variant %d: %d", VariantFuture, u4.Variant())
117 - }
118 -}
119 -
120 -func TestSetVariant(t *testing.T) {
121 - u := new(UUID)
122 - u.SetVariant()
123 -
124 - if u.Variant() != VariantRFC4122 {
125 - t.Errorf("Incorrect variant for UUID after u.setVariant(): %d", u.Variant())
126 - }
127 -}
128 -
129 -func TestFromBytes(t *testing.T) {
130 - u := UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
131 - b1 := []byte{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
132 -
133 - u1, err := FromBytes(b1)
134 - if err != nil {
135 - t.Errorf("Error parsing UUID from bytes: %s", err)
136 - }
137 -
138 - if !Equal(u, u1) {
139 - t.Errorf("UUIDs should be equal: %s and %s", u, u1)
140 - }
141 -
142 - b2 := []byte{}
143 -
144 - _, err = FromBytes(b2)
145 - if err == nil {
146 - t.Errorf("Should return error parsing from empty byte slice, got %s", err)
147 - }
148 -}
149 -
150 -func TestMarshalBinary(t *testing.T) {
151 - u := UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
152 - b1 := []byte{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
153 -
154 - b2, err := u.MarshalBinary()
155 - if err != nil {
156 - t.Errorf("Error marshaling UUID: %s", err)
157 - }
158 -
159 - if !bytes.Equal(b1, b2) {
160 - t.Errorf("Marshaled UUID should be %s, got %s", b1, b2)
161 - }
162 -}
163 -
164 -func TestUnmarshalBinary(t *testing.T) {
165 - u := UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
166 - b1 := []byte{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
167 -
168 - u1 := UUID{}
169 - err := u1.UnmarshalBinary(b1)
170 - if err != nil {
171 - t.Errorf("Error unmarshaling UUID: %s", err)
172 - }
173 -
174 - if !Equal(u, u1) {
175 - t.Errorf("UUIDs should be equal: %s and %s", u, u1)
176 - }
177 -
178 - b2 := []byte{}
179 - u2 := UUID{}
180 -
181 - err = u2.UnmarshalBinary(b2)
182 - if err == nil {
183 - t.Errorf("Should return error unmarshalling from empty byte slice, got %s", err)
184 - }
185 -}
186 -
187 -func TestFromString(t *testing.T) {
188 - u := UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
189 -
190 - s1 := "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
191 - s2 := "{6ba7b810-9dad-11d1-80b4-00c04fd430c8}"
192 - s3 := "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8"
193 -
194 - _, err := FromString("")
195 - if err == nil {
196 - t.Errorf("Should return error trying to parse empty string, got %s", err)
197 - }
198 -
199 - u1, err := FromString(s1)
200 - if err != nil {
201 - t.Errorf("Error parsing UUID from string: %s", err)
202 - }
203 -
204 - if !Equal(u, u1) {
205 - t.Errorf("UUIDs should be equal: %s and %s", u, u1)
206 - }
207 -
208 - u2, err := FromString(s2)
209 - if err != nil {
210 - t.Errorf("Error parsing UUID from string: %s", err)
211 - }
212 -
213 - if !Equal(u, u2) {
214 - t.Errorf("UUIDs should be equal: %s and %s", u, u2)
215 - }
216 -
217 - u3, err := FromString(s3)
218 - if err != nil {
219 - t.Errorf("Error parsing UUID from string: %s", err)
220 - }
221 -
222 - if !Equal(u, u3) {
223 - t.Errorf("UUIDs should be equal: %s and %s", u, u3)
224 - }
225 -}
226 -
227 -func TestMarshalText(t *testing.T) {
228 - u := UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
229 - b1 := []byte("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
230 -
231 - b2, err := u.MarshalText()
232 - if err != nil {
233 - t.Errorf("Error marshaling UUID: %s", err)
234 - }
235 -
236 - if !bytes.Equal(b1, b2) {
237 - t.Errorf("Marshaled UUID should be %s, got %s", b1, b2)
238 - }
239 -}
240 -
241 -func TestUnmarshalText(t *testing.T) {
242 - u := UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
243 - b1 := []byte("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
244 -
245 - u1 := UUID{}
246 - err := u1.UnmarshalText(b1)
247 - if err != nil {
248 - t.Errorf("Error unmarshaling UUID: %s", err)
249 - }
250 -
251 - if !Equal(u, u1) {
252 - t.Errorf("UUIDs should be equal: %s and %s", u, u1)
253 - }
254 -
255 - b2 := []byte("")
256 - u2 := UUID{}
257 -
258 - err = u2.UnmarshalText(b2)
259 - if err == nil {
260 - t.Errorf("Should return error trying to unmarshal from empty string")
261 - }
262 -}
263 -
264 -func TestScanBinary(t *testing.T) {
265 - u := UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
266 - b1 := []byte{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
267 -
268 - u1 := UUID{}
269 - err := u1.Scan(b1)
270 - if err != nil {
271 - t.Errorf("Error unmarshaling UUID: %s", err)
272 - }
273 -
274 - if !Equal(u, u1) {
275 - t.Errorf("UUIDs should be equal: %s and %s", u, u1)
276 - }
277 -
278 - b2 := []byte{}
279 - u2 := UUID{}
280 -
281 - err = u2.Scan(b2)
282 - if err == nil {
283 - t.Errorf("Should return error unmarshalling from empty byte slice, got %s", err)
284 - }
285 -}
286 -
287 -func TestScanString(t *testing.T) {
288 - u := UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
289 - s1 := "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
290 -
291 - u1 := UUID{}
292 - err := u1.Scan(s1)
293 - if err != nil {
294 - t.Errorf("Error unmarshaling UUID: %s", err)
295 - }
296 -
297 - if !Equal(u, u1) {
298 - t.Errorf("UUIDs should be equal: %s and %s", u, u1)
299 - }
300 -
301 - s2 := ""
302 - u2 := UUID{}
303 -
304 - err = u2.Scan(s2)
305 - if err == nil {
306 - t.Errorf("Should return error trying to unmarshal from empty string")
307 - }
308 -}
309 -
310 -func TestScanText(t *testing.T) {
311 - u := UUID{0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
312 - b1 := []byte("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
313 -
314 - u1 := UUID{}
315 - err := u1.Scan(b1)
316 - if err != nil {
317 - t.Errorf("Error unmarshaling UUID: %s", err)
318 - }
319 -
320 - if !Equal(u, u1) {
321 - t.Errorf("UUIDs should be equal: %s and %s", u, u1)
322 - }
323 -
324 - b2 := []byte("")
325 - u2 := UUID{}
326 -
327 - err = u2.Scan(b2)
328 - if err == nil {
329 - t.Errorf("Should return error trying to unmarshal from empty string")
330 - }
331 -}
332 -
333 -func TestScanUnsupported(t *testing.T) {
334 - u := UUID{}
335 -
336 - err := u.Scan(true)
337 - if err == nil {
338 - t.Errorf("Should return error trying to unmarshal from bool")
339 - }
340 -}
341 -
342 -func TestNewV1(t *testing.T) {
343 - u := NewV1()
344 -
345 - if u.Version() != 1 {
346 - t.Errorf("UUIDv1 generated with incorrect version: %d", u.Version())
347 - }
348 -
349 - if u.Variant() != VariantRFC4122 {
350 - t.Errorf("UUIDv1 generated with incorrect variant: %d", u.Variant())
351 - }
352 -
353 - u1 := NewV1()
354 - u2 := NewV1()
355 -
356 - if Equal(u1, u2) {
357 - t.Errorf("UUIDv1 generated two equal UUIDs: %s and %s", u1, u2)
358 - }
359 -
360 - oldFunc := epochFunc
361 - epochFunc = func() uint64 { return 0 }
362 -
363 - u3 := NewV1()
364 - u4 := NewV1()
365 -
366 - if Equal(u3, u4) {
367 - t.Errorf("UUIDv1 generated two equal UUIDs: %s and %s", u3, u4)
368 - }
369 -
370 - epochFunc = oldFunc
371 -}
372 -
373 -func TestNewV2(t *testing.T) {
374 - u1 := NewV2(DomainPerson)
375 -
376 - if u1.Version() != 2 {
377 - t.Errorf("UUIDv2 generated with incorrect version: %d", u1.Version())
378 - }
379 -
380 - if u1.Variant() != VariantRFC4122 {
381 - t.Errorf("UUIDv2 generated with incorrect variant: %d", u1.Variant())
382 - }
383 -
384 - u2 := NewV2(DomainGroup)
385 -
386 - if u2.Version() != 2 {
387 - t.Errorf("UUIDv2 generated with incorrect version: %d", u2.Version())
388 - }
389 -
390 - if u2.Variant() != VariantRFC4122 {
391 - t.Errorf("UUIDv2 generated with incorrect variant: %d", u2.Variant())
392 - }
393 -}
394 -
395 -func TestNewV3(t *testing.T) {
396 - u := NewV3(NamespaceDNS, "www.example.com")
397 -
398 - if u.Version() != 3 {
399 - t.Errorf("UUIDv3 generated with incorrect version: %d", u.Version())
400 - }
401 -
402 - if u.Variant() != VariantRFC4122 {
403 - t.Errorf("UUIDv3 generated with incorrect variant: %d", u.Variant())
404 - }
405 -
406 - if u.String() != "5df41881-3aed-3515-88a7-2f4a814cf09e" {
407 - t.Errorf("UUIDv3 generated incorrectly: %s", u.String())
408 - }
409 -
410 - u = NewV3(NamespaceDNS, "python.org")
411 -
412 - if u.String() != "6fa459ea-ee8a-3ca4-894e-db77e160355e" {
413 - t.Errorf("UUIDv3 generated incorrectly: %s", u.String())
414 - }
415 -
416 - u1 := NewV3(NamespaceDNS, "golang.org")
417 - u2 := NewV3(NamespaceDNS, "golang.org")
418 - if !Equal(u1, u2) {
419 - t.Errorf("UUIDv3 generated different UUIDs for same namespace and name: %s and %s", u1, u2)
420 - }
421 -
422 - u3 := NewV3(NamespaceDNS, "example.com")
423 - if Equal(u1, u3) {
424 - t.Errorf("UUIDv3 generated same UUIDs for different names in same namespace: %s and %s", u1, u2)
425 - }
426 -
427 - u4 := NewV3(NamespaceURL, "golang.org")
428 - if Equal(u1, u4) {
429 - t.Errorf("UUIDv3 generated same UUIDs for sane names in different namespaces: %s and %s", u1, u4)
430 - }
431 -}
432 -
433 -func TestNewV4(t *testing.T) {
434 - u := NewV4()
435 -
436 - if u.Version() != 4 {
437 - t.Errorf("UUIDv4 generated with incorrect version: %d", u.Version())
438 - }
439 -
440 - if u.Variant() != VariantRFC4122 {
441 - t.Errorf("UUIDv4 generated with incorrect variant: %d", u.Variant())
442 - }
443 -}
444 -
445 -func TestNewV5(t *testing.T) {
446 - u := NewV5(NamespaceDNS, "www.example.com")
447 -
448 - if u.Version() != 5 {
449 - t.Errorf("UUIDv5 generated with incorrect version: %d", u.Version())
450 - }
451 -
452 - if u.Variant() != VariantRFC4122 {
453 - t.Errorf("UUIDv5 generated with incorrect variant: %d", u.Variant())
454 - }
455 -
456 - u = NewV5(NamespaceDNS, "python.org")
457 -
458 - if u.String() != "886313e1-3b8a-5372-9b90-0c9aee199e5d" {
459 - t.Errorf("UUIDv5 generated incorrectly: %s", u.String())
460 - }
461 -
462 - u1 := NewV5(NamespaceDNS, "golang.org")
463 - u2 := NewV5(NamespaceDNS, "golang.org")
464 - if !Equal(u1, u2) {
465 - t.Errorf("UUIDv5 generated different UUIDs for same namespace and name: %s and %s", u1, u2)
466 - }
467 -
468 - u3 := NewV5(NamespaceDNS, "example.com")
469 - if Equal(u1, u3) {
470 - t.Errorf("UUIDv5 generated same UUIDs for different names in same namespace: %s and %s", u1, u2)
471 - }
472 -
473 - u4 := NewV5(NamespaceURL, "golang.org")
474 - if Equal(u1, u4) {
475 - t.Errorf("UUIDv3 generated same UUIDs for sane names in different namespaces: %s and %s", u1, u4)
476 - }
477 -}
package.json
+6
@@ -69,6 +69,12 @@
69 "hash": "QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku",
70 "name": "go-multihash",
71 "version": "0.0.0"
72 + },
73 + {
74 + "author": "satori",
75 + "hash": "QmcyaFHbyiZfoX5GTpcqqCPYmbjYNAhRDekXSJPFHdYNSV",
76 + "name": "go.uuid",
77 + "version": "1.0.0"
78 }
79 ],
80 "gxVersion": "0.4.0",
thirdparty/loggables/loggables.go
+1 -1
@@ -9,7 +9,7 @@ package loggables
9 import (
10 "net"
11
12 - uuid "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/satori/go.uuid"
12 + uuid "gx/ipfs/QmcyaFHbyiZfoX5GTpcqqCPYmbjYNAhRDekXSJPFHdYNSV/go.uuid"
13
14 ma "gx/ipfs/QmYzDkkgAEmrcNzFCiYo6L1dTX4EAG1gZkbtdbd9trL4vd/go-multiaddr"
15