main: generate 64bit id

This commit is contained in:
Xiang Li 2014-07-10 17:10:12 -07:00 committed by Yicheng Qin
parent c4e7432ef9
commit 18d95b336f

View File

@ -41,9 +41,9 @@ func main() {
serve("etcd", config.BindAddr, config.EtcdTLSInfo(), corsInfo, e)
}
func genId() int {
func genId() int64 {
r := rand.New(rand.NewSource(int64(time.Now().Nanosecond())))
return r.Int()
return r.Int63()
}
func serve(who string, addr string, tinfo *config.TLSInfo, cinfo *ehttp.CORSInfo, handler http.Handler) {