title: How to share data in go‘s middlewares efficiently?
body: <p>How to share data in go‘s middlewares efficiently?</p>
  
  <p>Known solutions:</p>
  
  <ol>
  <li><p>Global map[interface{}]interface{}, it need type assertion and mutex, it is not i want.</p></li>
  <li><p>Standard library: <strong>x/net/context</strong>, but I can not visit the <strong>golang.org</strong>(blocked by Great Firewall of China), 
  can somebody provides some examples or articles? Thanks.</p></li>
  </ol>
  
  <p>Could somebody tell me what other efficient solution?</p>