What version of Go are you using (go version)?
dev branch (playground)
Does this issue reproduce with the latest release?
No, url.JoinPath() is not in Go 1.18.
What operating system and processor architecture are you using (go env)?
dev branch (playground)
What did you do?
https://go.dev/play/p/xCJcVPN5pPh?v=gotip
func main() {
fmt.Println(url.JoinPath("http://host/foo", "bar/"))
}
What did you expect to see?
The trailing slash should be preserved: http://host/foo/bar/
What did you see instead?
The trailing slash is lost: http://host/foo/bar
What version of Go are you using (
go version)?dev branch (playground)
Does this issue reproduce with the latest release?
No, url.JoinPath() is not in Go 1.18.
What operating system and processor architecture are you using (
go env)?dev branch (playground)
What did you do?
https://go.dev/play/p/xCJcVPN5pPh?v=gotip
What did you expect to see?
The trailing slash should be preserved:
http://host/foo/bar/What did you see instead?
The trailing slash is lost:
http://host/foo/bar