Closed
Description
What version of Go are you using (go version
)?
$ go version go version devel +50ad094 Sun Apr 28 23:51:04 2019 +0000 darwin/amd64
Does this issue reproduce with the latest release?
No.
What operating system and processor architecture are you using (go env
)?
GOOS=js GOARCH=wasm
What did you do?
I compiled this program into WebAssembly and ran it in a browser:
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
resp, err := http.Get("/")
if err != nil {
log.Fatalln(err)
}
defer resp.Body.Close()
fmt.Println(resp.Status)
}
What did you expect to see?
200 OK
What did you see instead?
<number: 200> OK
Cause
This is happening after #29642 (comment) was implemented in CL 169757. We can't use the String()
method on non-string JavaScript types as a fmt.Sprint
shortcut anymore.
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
gopherbot commentedon Apr 29, 2019
Change https://golang.org/cl/174218 mentions this issue:
net/http: remove "number:" from Response.Status string
fix (#1)