]> Cypherpunks repositories - gostls13.git/commit
cmd/go: don't compute Embed fields if they're not needed
authorFrank Viernau <frank_viernau@epam.com>
Mon, 20 Feb 2023 09:08:00 +0000 (09:08 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 23 Feb 2023 15:24:16 +0000 (15:24 +0000)
commitc0ac33c00614a2f36c88671ef7c520d246cd8bc9
tree6eb1da6cd60db60aa7cdbec4884dc867ddac62cb
parent4c5d6edeb2b10c2044d1ea2b4fa3e403133431c8
cmd/go: don't compute Embed fields if they're not needed

If the user provides the -json flag to explicitly specify fields, but doesn't specify any *Embed* field, skip computing the embed fields.

This enhances the initial implementation of #29666.

Change-Id: I60e86fb25a445689aecbcc7f3f3f88e0f37a0fc5
GitHub-Last-Rev: 2795c195bf995f798a45e928becebc253c89b9d6
GitHub-Pull-Request: golang/go#58522
Reviewed-on: https://go-review.googlesource.com/c/go/+/468075
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
src/cmd/go/internal/list/list.go
src/cmd/go/internal/load/pkg.go
src/cmd/go/testdata/script/list_json_fields.txt