by apoydence:
What happened?
- net/url doesn't properly "correct" a malformed URL.
x, _ := url.Parse("http:/localhost:9999/a")
println(x.String()) // outputs: http:///localhost:9999/a
What should have happened instead?
- It should either output an error, or output "http://localhost:9999/a
Playground:
https://play.golang.org/p/HkSSHIxAPW