mirror of
https://github.com/coredns/coredns.git
synced 2025-12-09 03:45:11 -05:00
Use context.Context
Rename the old Context to State and use context.Context in the middleware for intra-middleware communication and more.
This commit is contained in:
@@ -1,17 +1,9 @@
|
||||
package log
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
/*
|
||||
type erroringMiddleware struct{}
|
||||
|
||||
func (erroringMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
|
||||
func (erroringMiddleware) ServeDNS(w dns.ResponseWriter, r *dns.Msg) (int, error) {
|
||||
return http.StatusNotFound, nil
|
||||
}
|
||||
|
||||
@@ -46,3 +38,4 @@ func TestLoggedStatus(t *testing.T) {
|
||||
t.Error("Expected 404 to be logged. Logged string -", logged)
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user