title: Dynamically add routes in golang http
body: <p>I am trying to read routes from json and appending them to mux , but instead of appending it seems to overwrite routes. </p>
  
  <p>Code snippet</p>
  
  <pre><code> func main() {
  
      configLoader()
  
      dispatchMux := http.NewServeMux()
  
      for _, site := range ServerConfigData.Sites {
          append(dispatchMux, site.Incomming, site.Forward)
      }
  
      // Start the server
  
      color.Green("Server Spinned Up on 2096")
      http.ListenAndServe(":2096", dispatchMux)
  }
  
   // Route Appender
   func append(mux *http.ServeMux, incomming, forward string) {
          color.Yellow("Starting ", incomming, " on ", forward, "\n")
          parsedURL, _ := url.Parse(forward)
          mux.Handle(incomming, httputil.NewSingleHostReverseProxy(parsedURL))
  }
  </code></pre>