MCPcopy
hub / github.com/gorilla/mux / Example_authenticationMiddleware

Function Example_authenticationMiddleware

example_authentication_middleware_test.go:38–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36}
37
38func Example_authenticationMiddleware() {
39 r := mux.NewRouter()
40 r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
41 // Do something here
42 })
43 amw := authenticationMiddleware{make(map[string]string)}
44 amw.Populate()
45 r.Use(amw.Middleware)
46}

Callers

nothing calls this directly

Calls 4

HandleFuncMethod · 0.95
PopulateMethod · 0.95
UseMethod · 0.95
NewRouterFunction · 0.92

Tested by

no test coverage detected