You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the percent ("%") character serves as the indicator for percent-encoded octets, it must be percent-encoded as "%25" for that octet to be used as data within a URI.
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() {
u, _ := url.Parse("file:///home/dami/Desktop/%25.txt")
fmt.Println(u.Path)
}
What did you expect to see?
go run main.go
/home/dami/Desktop/%25.txt
What did you see instead?
go run main.go
/home/dami/Desktop/%.txt
The text was updated successfully, but these errors were encountered: