title: Go: Get path parameters from http.Request
body: <p>I'm developing a REST API with Go, but I don't know how can I do the path mappings and retrieve the path parameters from them.</p>
  
  <p>I want something like this:</p>
  
  <pre><code>func main() {
      http.HandleFunc("/provisions/:id", Provisions) //&lt;-- How can I map "id" parameter in the path?
      http.ListenAndServe(":8080", nil)
  }
  
  func Provisions(w http.ResponseWriter, r *http.Request) {
      //I want to retrieve here "id" parameter from request
  }
  </code></pre>
  
  <p>I would like to use just <code>http</code> package instead of web frameworks, if it is possible.</p>
  
  <p>Thanks.</p>