We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer these questions before submitting your issue. Thanks!
go version
go version devel +479da24aac Fri Aug 10 00:47:31 2018 +0000 darwin/amd64
Yes, it does.
go env
GOARCH="amd64" GOBIN="" GOCACHE="/Users/wingyplus/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/wingyplus/gopath" GOPROXY="" GORACE="" GOROOT="/Users/wingyplus/go/go" GOTMPDIR="" GOTOOLDIR="/Users/wingyplus/go/go/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" 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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/dj/kszxmd1d1lbf7g34gxsb3v980000gn/T/go-build172215713=/tmp/go-build -gno-record-gcc-switches -fno-common"
I try to investigate the problem on #26921. And found format.Source is wrong behaviour. The reproduce source is:
format.Source
package main import ( "fmt" "go/format" "log" ) const src = `package main // comment import "fmt" // T does something useful. func T() { var _ = fmt.Printf } ` func main() { out, err := format.Source([]byte(src)) if err != nil { log.Fatal(err) } fmt.Println(string(out)) }
package main // comment import "fmt" // T does something useful. func T() { var _ = fmt.Printf }
The text was updated successfully, but these errors were encountered:
cc @mvdan @griesemer
Sorry, something went wrong.
Possibly related to #26930?
I think this is dup of #22631. This has been like this since 1.9.
Indeed a duplicate, and likely not a regression in 1.11.
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version devel +479da24aac Fri Aug 10 00:47:31 2018 +0000 darwin/amd64
Does this issue reproduce with the latest release?
Yes, it does.
What operating system and processor architecture are you using (
go env
)?What did you do?
I try to investigate the problem on #26921. And found
format.Source
is wrong behaviour. The reproduce source is:What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: