1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 09:59:13 +08:00

update random

This commit is contained in:
Brian Tiger Chow
2015-01-16 15:10:44 -08:00
parent 61e4300d59
commit 043b57f075
3 changed files with 15 additions and 2 deletions

2
Godeps/Godeps.json generated
View File

@ -156,7 +156,7 @@
},
{
"ImportPath": "github.com/jbenet/go-random",
"Rev": "2e83344e7dc7898f94501665af34edd4aa95a013"
"Rev": "c50d0ce235bacde481d3e885b5dfd562c75c981a"
},
{
"ImportPath": "github.com/jbenet/go-temp-err-catcher",

View File

@ -0,0 +1,11 @@
language: go
go:
- 1.3
- release
- tip
script:
- go test ./...
env: TEST_VERBOSE=1

View File

@ -5,6 +5,7 @@ import (
"os"
"strconv"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/dustin/go-humanize"
random "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-random"
)
@ -14,10 +15,11 @@ func main() {
usageError()
}
count, err := strconv.ParseInt(os.Args[1], 10, 64)
countuint64, err := humanize.ParseBytes(os.Args[1])
if err != nil {
usageError()
}
count := int64(countuint64)
if l == 2 {
err = random.WriteRandomBytes(count, os.Stdout)