DEV Community

loading...

Go - Build URL Query String

#go
takakd profile image Takahiro Kudo ・1 min read
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

Discussion (0)

pic
Editor guide