mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Use chi style middle ware
This commit is contained in:
committed by
Travis Reeder
parent
570e9265f1
commit
cf2c3cf404
@@ -1,12 +1,15 @@
|
||||
package server
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"net/http"
|
||||
"testing"
|
||||
)
|
||||
|
||||
type testSpecialHandler struct{}
|
||||
|
||||
func (h *testSpecialHandler) Handle(c HandlerContext) error {
|
||||
// c.Set(api.AppName, "test")
|
||||
return nil
|
||||
func (h *testSpecialHandler) Handle(w http.ResponseWriter, r *http.Request) (*http.Request, error) {
|
||||
// r = r.WithContext(context.WithValue(r.Context(), api.AppName, "test"))
|
||||
return r, nil
|
||||
}
|
||||
|
||||
func TestSpecialHandlerSet(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user