When using the middleware function of gorilla/mux, how to share data among middleware

  golang, question
package main
 
 import (
 "net/http"
 
 "github.com/gorilla/mux"
 )
 
 func main() {
 r := mux.NewRouter()
 
 r.Use(middleware1)
 r.Use(middleware2)
 
 r.HandleFunc("/user", getUser)
 }

Now I need to do some processing on token in middleware1, and then save the processing result for the subsequent middleware. Where can I save it or what other method should I use to implement it?

http.RequestTheContextIt can be used to share data among middleware.