title: How to rotate between multiple forwarding proxies for outgoing requests with golang
body: <p>I will like to pass a list of forwarding proxy servers for POST request</p>
  <p>Currently i am able to do it with just single forwarding proxy</p>
  <pre class="lang-golang prettyprint-override"><code>serverProxy := &quot;http://user:password@123.45.67.89:3128&quot;
  
  request, error := http.NewRequest(&quot;POST&quot;, httpposturl, bytes.NewBuffer(requestJSON))
  request.Header.Set(&quot;Content-Type&quot;, &quot;application/json; charset=UTF-8&quot;)
  
  proxyURL, _ := url.Parse(serverProxy)
  proxy := http.ProxyURL(proxyURL)
  transport := &amp;http.Transport{Proxy: proxy}
  client := &amp;http.Client{Transport: transport}
  </code></pre>
  <p>what i will like to do is pass a list to <code>url.Parse</code> and want it to use them using round robin balancing</p>
  <p>so something like this</p>
  <pre><code>serverProxy := &quot;http://user:password@123.45.67.89:3128, http://user:password@223.45.67.89:3128&quot;
  </code></pre>
  <p>and then it will select which of the proxy servers to use and rotate them within requests</p>
  <p>Is this possible?</p>
  <blockquote>
  <p><strong>UPDATE:</strong></p>
  </blockquote>
  <p>I want to be able to pass the rotated proxy server like this</p>
  <pre><code>proxyServer := roundRobin(&quot;http://round:robin@123.45.67.89:3128, http://robin:round@223.45.67.89:3128&quot;)
  fmt.Println(&quot;proxy server used&quot;, proxyServer, &quot;\n&quot;)
  transport := &amp;http.Transport{Proxy: proxyServer}
  client := &amp;http.Client{Transport: transport}
  </code></pre>