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
What steps will reproduce the problem?
1. go run issue.go
What is the expected output?
test/ test/ test/
test/ test/ test/
<a href="test/"> - 1 - </a><a href="test/"> - 2 -
</a><a href="test/"> -3 - </a>
What do you see instead?
test/ test/ test/
<a href="%7b%20%20%3cnil%3e%20%20test/%20%20%7d>"> - 1 -
</a><a href="test/"> - 2 - </a><a
href="test/"> -3 - </a>
Which compiler are you using (5g, 6g, 8g, gccgo)?
go version weekly.2012-02-14 +43cf9b39b647
Which operating system are you using?
uname -a:
Linux ubuntu 3.0.0-16-generic #29-Ubuntu SMP Tue Feb 14 12:48:51 UTC 2012 x86_64 x86_64
x86_64 GNU/Linux
Which revision are you using? (hg identify)
Please provide any additional information below.
Shorter example:
package main
import (
"log"
"net/url"
"html/template"
"os"
)
func main() {
u, _ := url.Parse("test/")
if err := template.Must(template.New("x").Parse("{{.}}\n")).Execute(os.Stdout, u); err != nil {
log.Fatal(err)
}
}
prints
{ <nil> test/ }
should print
test/
It is, for some reason, not calling u's String method.
Attachments:
The text was updated successfully, but these errors were encountered: