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
go version
1.16.9 and 1.21.0
Assume to be yes...
go env
GO111MODULE='' GOARCH='amd64' GOBIN='' GOCACHE='/Users/dida/Library/Caches/go-build' GOENV='/Users/dida/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='amd64' GOHOSTOS='darwin' GOINSECURE='' GOMODCACHE='/Users/dida/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='darwin' GOPATH='/Users/dida/go' GOPRIVATE='' GOROOT='/usr/local/go' GOSUMDB='off' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64' GOVCS='' GOVERSION='go1.21.0' GCCGO='gccgo' GOAMD64='v1' AR='ar' CC='clang' CXX='clang++' CGO_ENABLED='1' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/w9/9v8mf_pd0z1dy6jy7y4n3vrm0000gn/T/go-build1478959190=/tmp/go-build -gno-record-gcc-switches -fno-common'
logging sql.DB directly.. as:
https://go.dev/play/p/_85W8oythtk
better to add a 'String()' for sql.DB struct which has a map in it...
panics:
fatal error: concurrent map iteration and map write goroutine 18 [running]: reflect.mapiternext(0x46db69?) /usr/local/go-faketime/src/runtime/map.go:1397 +0x13 reflect.(*MapIter).Next(0xc00010a7e8?) /usr/local/go-faketime/src/reflect/value.go:1940 +0x74 internal/fmtsort.Sort({0x484fa0?, 0xc000090000?, 0x0?}) /usr/local/go-faketime/src/internal/fmtsort/sort.go:62 +0x1d3 fmt.(*pp).printValue(0xc000104000, {0x484fa0?, 0xc000090000?, 0x0?}, 0x76, 0x2) /usr/local/go-faketime/src/fmt/print.go:816 +0x988
The text was updated successfully, but these errors were encountered:
there are no exported fields, you're not supposed to access it like this.
Sorry, something went wrong.
json.marshal won't access the un-exported, but 'log' or 'fmt' does ACCESS them, somewhat via 'reflect'..
go vet and race tools can not detect this.
any way to make this more "user" friendly? any blog or conversation before?
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Assume to be yes...
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
logging sql.DB directly.. as:
https://go.dev/play/p/_85W8oythtk
What did you expect to see?
better to add a 'String()' for sql.DB struct which has a map in it...
What did you see instead?
panics:
The text was updated successfully, but these errors were encountered: