We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go version
$ go version go version go1.23.0 darwin/arm64
yes
go env
$ go env GO111MODULE='' GOARCH='arm64' GOBIN='' GOCACHE='/Users/danysz/Library/Caches/go-build' GOENV='/Users/danysz/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='arm64' GOHOSTOS='darwin' GOINSECURE='' GOMODCACHE='/Users/danysz/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='darwin' GOPATH='/Users/danysz/go' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/opt/homebrew/Cellar/go/1.23.0/libexec' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='local' GOTOOLDIR='/opt/homebrew/Cellar/go/1.23.0/libexec/pkg/tool/darwin_arm64' GOVCS='' GOVERSION='go1.23.0' GODEBUG='' GOTELEMETRY='local' GOTELEMETRYDIR='/Users/danysz/Library/Application Support/go/telemetry' GCCGO='gccgo' GOARM64='v8.0' AR='ar' CC='cc' CXX='c++' CGO_ENABLED='1' GOMOD='/dev/null' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/p2/s5fllbzj1f5cp6jjk8_3w6l80000gn/T/go-build441744932=/tmp/go-build -gno-record-gcc-switches -fno-common' GOROOT/bin/go version: go version go1.23.0 darwin/arm64 GOROOT/bin/go tool compile -V: compile version go1.23.0 uname -v: Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6020 ProductName: macOS ProductVersion: 14.6.1 BuildVersion: 23G93 lldb --version: lldb-1500.0.404.7 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
package main
import ( "fmt" "net/url" )
func main() { params := url.Values{} // Add a parameter with multiple values
params.Add("key1", "val1-1") params.Add("key2", "val2-1") params.Add("key3", "val3-1") params.Add("key3", "val3-2") params.Add("key3", "val3-3") params.Add("key1", "val1-2") params.Add("key2", "val2-2") fmt.Println(params.Encode())
}
key1=val1-1,val1-2&key2=val2-1,val2-2&key3=val3-1,val3-2,val3-3
key1=val1-1&key1=val1-2&key2=val2-1&key2=val2-2&key3=val3-1&key3=val3-2&key3=val3-3
The text was updated successfully, but these errors were encountered:
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Sorry, something went wrong.
Change https://go.dev/cl/609299 mentions this issue: net/url: fixes #69129
net/url: fixes #69129
separation by commas in not supported by any standard.
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
package main
import (
"fmt"
"net/url"
)
func main() {
params := url.Values{}
// Add a parameter with multiple values
}
What did you expect to see?
key1=val1-1,val1-2&key2=val2-1,val2-2&key3=val3-1,val3-2,val3-3
What did you see instead?
key1=val1-1&key1=val1-2&key2=val2-1&key2=val2-2&key3=val3-1&key3=val3-2&key3=val3-3
The text was updated successfully, but these errors were encountered: