DEV Community

Takahiro Kudo
Takahiro Kudo

Posted on

Go - Build URL Query String

#go
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

Top comments (0)