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
Minimal code to represent issue
type A string type B struct { A `json:"a"` } func TestXXX(t *testing.T) { x := B{} // struct type 'B' doesn't have any exported fields, // nor custom marshaling (SA9005)go-staticcheck b, _ := json.Marshal(x) fmt.Printf("%s\n", string(b)) }
staticcheck -version staticcheck 2023.1.5 (v0.4.5)
staticcheck -debug.version staticcheck 2023.1.5 (v0.4.5) Compiled with Go version: go1.20.4 Main module: honnef.co/go/tools@v0.4.5 (sum: h1:YGD4H+SuIOOqsyoLOpZDWcieM28W47/zRO7f+9V3nvo=) Dependencies: github.com/BurntSushi/toml@v1.2.1 (sum: h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=) golang.org/x/exp/typeparams@v0.0.0-20221208152030-732eee02a75a (sum: h1:Jw5wfR+h9mnIYH+OtGT2im5wV1YGGDora5vTv/aa5bE=) golang.org/x/mod@v0.10.0 (sum: h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=) golang.org/x/sys@v0.8.0 (sum: h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=) golang.org/x/tools@v0.9.4-0.20230601214343-86c93e8732cc (sum: h1:mqZawFxUzsv+YVwGQO30cZegeV/YD6dAwsdGxi0tQQg=)
go version go version go1.20.4 darwin/arm64
go env GO111MODULE="" GOARCH="arm64" GOBIN="" GOCACHE="/Users/kolesnik/Library/Caches/go-build" GOENV="/Users/kolesnik/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/kolesnik/devel/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/kolesnik/devel/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.20.4" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/kolesnik/devel/go/src/github.com/fogfish/schemaorg/schemaext/go.mod" GOWORK="/Users/kolesnik/devel/go/src/github.com/fogfish/schemaorg/go.work" 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 arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/98/0ttsxqrn6q13jwh9shqc30jr0000gn/T/go-build2539534517=/tmp/go-build -gno-record-gcc-switches -fno-common"
The text was updated successfully, but these errors were encountered:
Fascinating. Will fix.
Sorry, something went wrong.
Thank you
ad5ca31
go/types/typeutil: when flattening, don't ignore embedded types that …
7e20d40
…aren't structs Closes: gh-1443 (cherry picked from commit ad5ca31)
No branches or pull requests
Minimal code to represent issue
The text was updated successfully, but these errors were encountered: