mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-30 18:13:54 +08:00
update random
This commit is contained in:
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
@ -156,7 +156,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/jbenet/go-random",
|
||||
"Rev": "2e83344e7dc7898f94501665af34edd4aa95a013"
|
||||
"Rev": "c50d0ce235bacde481d3e885b5dfd562c75c981a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/jbenet/go-temp-err-catcher",
|
||||
|
11
Godeps/_workspace/src/github.com/jbenet/go-random/.travis.yml
generated
vendored
Normal file
11
Godeps/_workspace/src/github.com/jbenet/go-random/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.3
|
||||
- release
|
||||
- tip
|
||||
|
||||
script:
|
||||
- go test ./...
|
||||
|
||||
env: TEST_VERBOSE=1
|
4
Godeps/_workspace/src/github.com/jbenet/go-random/random/random.go
generated
vendored
4
Godeps/_workspace/src/github.com/jbenet/go-random/random/random.go
generated
vendored
@ -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)
|
||||
|
Reference in New Issue
Block a user