mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04: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,15 +1,6 @@
|
||||
package rewrite
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/miekg/coredns/middleware"
|
||||
)
|
||||
|
||||
/*
|
||||
func TestRewrite(t *testing.T) {
|
||||
rw := Rewrite{
|
||||
Next: middleware.HandlerFunc(urlPrinter),
|
||||
@@ -157,3 +148,4 @@ func urlPrinter(w http.ResponseWriter, r *http.Request) (int, error) {
|
||||
fmt.Fprintf(w, r.URL.String())
|
||||
return 0, nil
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user