Closed
Description
What version of Go are you using (go version
)?
$ go version go version go1.12.8 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GOARCH="amd64" GOBIN="" GOCACHE="/home/username/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/username/.golang" GOPROXY="" GORACE="" GOROOT="/usr/lib/go-1.12" GOTMPDIR="" GOTOOLDIR="/usr/lib/go-1.12/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/username/project/path/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build680907567=/tmp/go-build -gno-record-gcc-switches"
What did you do?
Attempted add the header "js.fetch:mode" so my code will work correctly in a wasm target.
However, now the amd64 target through the error:
net/http: invalid header field name "js.fetch:mode"
What did you expect to see?
it to just ignore the header
What did you see instead?
an error
Other comments
What is the best practice for handling code that is intended to support multiple build targets?