update random
Brian Tiger Chow committed
Jan 16, 2015 at 15:10 UTC
043b57f0756e42c0236fe65980d26891b018e6ba
3 files changed
+15
-2
Godeps/Godeps.json
+1
-1
@@ -156,7 +156,7 @@
156
},
157
{
158
"ImportPath": "github.com/jbenet/go-random",
159
- "Rev": "2e83344e7dc7898f94501665af34edd4aa95a013"
159
+ "Rev": "c50d0ce235bacde481d3e885b5dfd562c75c981a"
160
},
161
{
162
"ImportPath": "github.com/jbenet/go-temp-err-catcher",
Godeps/_workspace/src/github.com/jbenet/go-random/.travis.yml
new
+11
@@ -0,0 +1,11 @@
1
+language: go
2
+
3
+go:
4
+ - 1.3
5
+ - release
6
+ - tip
7
+
8
+script:
9
+ - go test ./...
10
+
11
+env: TEST_VERBOSE=1
Godeps/_workspace/src/github.com/jbenet/go-random/random/random.go
+3
-1
@@ -5,6 +5,7 @@ import (
5
"os"
6
"strconv"
7
8
+ "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/dustin/go-humanize"
9
random "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-random"
10
)
11
@@ -14,10 +15,11 @@ func main() {
15
usageError()
16
}
17
17
- count, err := strconv.ParseInt(os.Args[1], 10, 64)
18
+ countuint64, err := humanize.ParseBytes(os.Args[1])
19
if err != nil {
20
usageError()
21
}
22
+ count := int64(countuint64)
23
24
if l == 2 {
25
err = random.WriteRandomBytes(count, os.Stdout)