go-ego / riot

Go Open Source, Distributed, Simple and efficient Search Engine; Warning: This is V1 and beta version, because of big memory consume, and the V2 will be rewrite all code.
Apache License 2.0
6.11k stars 473 forks source link

Vendoring std net lib causes panic in unvedored applications #57

Closed ikozinov closed 6 years ago

ikozinov commented 6 years ago

panic: http: multiple registrations for /debug/requests

goroutine 1 [running]: net/http.(ServeMux).Handle(0x1681840, 0xf9da88, 0xf, 0x16275a0, 0xfdc2e0) /usr/local/go/src/net/http/server.go:2270 +0x627 net/http.(ServeMux).HandleFunc(0x1681840, 0xf9da88, 0xf, 0xfdc2e0) /usr/local/go/src/net/http/server.go:2302 +0x55 net/http.HandleFunc(0xf9da88, 0xf, 0xfdc2e0) /usr/local/go/src/net/http/server.go:2314 +0x4b github.com/go-ego/riot/vendor/golang.org/x/net/trace.init.0() /home/ivk/go/src/github.com/go-ego/riot/vendor/golang.org/x/net/trace/trace.go:115 +0x42 github.com/go-ego/riot/vendor/golang.org/x/net/trace.init()

:1 +0x1cd github.com/go-ego/riot/vendor/github.com/dgraph-io/badger.init() :1 +0x78 github.com/go-ego/riot/storage.init() ----------------- This problem resolving very simple -- removing "net" dependency from: Gopkg.toml. #[[constraint]] # branch = "master" # name = "golang.org/x/net"
vcaesar commented 6 years ago

Thanks. I will check it and update it.

vcaesar commented 6 years ago

I updated the vendor, and tested Stroe, no error, if the error persists, please tell me how to reproduce it.