Passing an array/slice as a url parameter
<p>I have a simple web server that intercepts geospatial map tile requests, swaps out pixels, and passes the image along to a front end to serve them. It works great, but the request is getting quite large. I was wondering if I could pass an array or slice instead? I couldn't seem to find anything searching. For example: </p>

<pre><code>http://localhost:8002/tiles?url=url&amp;r=0&amp;g=250&amp;b=0&amp;a=230&amp;replaceR=0&amp;replaceG=127&amp;replaceB=0&amp;replaceA=0
</code></pre>

<p>is my typical request. I want to add more colors to swap so it would be great if I could pass something like:</p>

<pre><code>http://localhost:8002/tiles?url=url&amp;rgba1=[0,250,0,230,0,127,0,0]&amp;rgba2=[250,0,100,100,200,0,20,180]
</code></pre>

<p>Is this possible? I tried to loop it like:</p>

<pre><code>form := make(map[string][]uint8)
for k, v := range r.URL.Query() {
    arr := []uint8{}
    for i := 0; i &lt; len(v); i++ {
        val, err := strconv.ParseInt(v[i], 10, 32)
        arr = append(arr, uint8(val))
        if err != nil {
        }
    }
    form[k] = arr
}
</code></pre>

<p>But it just prints [0]</p>