title: router in Go - run a function before each http request
body: <p>I'm using Go with http with Go like this:  </p>
  
  <pre><code>mux := http.NewServeMux()
  mux.HandleFunc("/API/user", test)
  mux.HandleFunc("/authAPI/admin", auth)
  </code></pre>
  
  <p>and I would like to run  a function before every http request
  and better yet, run a function on every request that has the /authAPI/ in them.<br>
  how can I achieve this in Go?</p>