go

Go - Build URL Query String

takakd

Takahiro Kudo

Posted on June 19, 2020

Go - Build URL Query String
params := url.Values{
    "keyword": {"some"},
}
reqUrl := "https://yourendpoint.example.com?" + params.Encode()
Enter fullscreen mode Exit fullscreen mode

Reference

https://golang.org/pkg/net/url/#URL.Query

💖 💪 🙅 🚩
takakd
Takahiro Kudo

Posted on June 19, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related