title: Handle Gorilla mux empty variable
body: <p>I'm using gorilla mux to get pattern values. How do I handle an empty variable like so:</p>
  
  <p>Go:</p>
  
  <pre><code>func ProductHandler (w http.ResponseWriter, r *http.Request) {
      vars := mux.Vars(r)
      a := vars["key"]
      if a = "" {       //does not seem to register empty string
         //do something
      } else 
         //do something
  }
  
  var r = mux.NewRouter()
  
  func main() {
      r.HandleFunc("/products/{key}", ProductHandler)
  
      http.Handle("/", r)
  
      http.ListenAndServe(":8080", nil)
  }
  </code></pre>
  
  <p>When I type the url www.example.com/products or www.example.com/products/ I get a 404 page not found error. How do i handle an empty variable in ProductHandler?</p>
  
  <p><a href="http://www.gorillatoolkit.org/pkg/mux" rel="nofollow">http://www.gorillatoolkit.org/pkg/mux</a></p>