Multiple query parameters in URL

can anyone help me to convert the multiple query parameters in URL
i.e.

abc.com?convert=USD&id=1&id=2&id=3 

to

abc.com?convert=USD&id=1,2,3 

The value ID is []int and coming from a struct ,for example

type ABC struct {
ID []int `url:"id"`
} 

and I am using “github.com/google/go-querystring/query” for encoding and querrying.

I have written one-liner converter for you, see here https://play.golang.org/p/21547Wv9Qv2

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.