Skip to content
Permalink
Browse files
Fix nil panic in authentication middleware example (#489)
  • Loading branch information
fharding1 authored and elithrar committed Jun 28, 2019
1 parent 212aa90 commit 4248f5cd8717eaea35eded08100714b2b2bac756
Showing 1 changed file with 1 addition and 1 deletion.
2 doc.go
@@ -295,7 +295,7 @@ A more complex authentication middleware, which maps session token to users, cou
r := mux.NewRouter()
r.HandleFunc("/", handler)
amw := authenticationMiddleware{}
amw := authenticationMiddleware{tokenUsers: make(map[string]string)}
amw.Populate()
r.Use(amw.Middleware)

0 comments on commit 4248f5c

Please sign in to comment.