提交 67802287 作者: Brian Tiger Chow

fix: seed the random number generator

License: MIT
Signed-off-by: 's avatarBrian Tiger Chow <brian@perfmode.com>
上级 04a5dd51
......@@ -4,11 +4,13 @@ import (
"errors"
"fmt"
"io"
"math/rand"
"os"
"os/signal"
"runtime"
"runtime/pprof"
"syscall"
"time"
// TODO rm direct reference to go-logging
logging "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-logging"
......@@ -55,7 +57,8 @@ type cmdInvocation struct {
// - output the response
// - if anything fails, print error, maybe with help
func main() {
runtime.GOMAXPROCS(3)
rand.Seed(time.Now().UnixNano())
runtime.GOMAXPROCS(3) // FIXME rm arbitrary choice for n
ctx := context.Background()
var err error
var invoc cmdInvocation
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论