go test ok

master
bel 2023-03-26 08:48:46 -06:00
parent 02c49852c0
commit 340ca1d2f5
1 changed files with 3 additions and 2 deletions

View File

@ -13,7 +13,7 @@ func (v01 *V01) listen() {
if v01.cfg.Feedback.Addr == "" {
return
}
return v01._listen()
v01._listen()
}
func (v01 *V01) _listen() {
@ -21,7 +21,6 @@ func (v01 *V01) _listen() {
s := &http.Server{
Addr: v01.cfg.Feedback.Addr,
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
r = r.WithContext(v01.ctx)
if r.Method == http.MethodGet {
mutex.RLock()
defer mutex.RUnlock()
@ -45,7 +44,9 @@ func (v01 *V01) _listen() {
}
func (v01 *V01) ServeHTTP(w http.ResponseWriter, r *http.Request) {
r = r.WithContext(v01.ctx)
v01.serveHTTP(w, r)
v01.globalQueries(r)
}
func (v01 *V01) serveHTTP(w http.ResponseWriter, r *http.Request) {