From: Michael Matloob Date: Thu, 7 Jan 2021 03:13:45 +0000 (-0500) Subject: cmd/go: add documentation for Embed fields in go list output X-Git-Tag: go1.16rc1~115 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7cee66d4cb;p=gostls13.git cmd/go: add documentation for Embed fields in go list output This change the struct fields for EmbedPatterns and EmbedFiles to the Package struct listed in the go list documentation that specifies the fields available to the go list template. Fixes #43081 Change-Id: I89c325a9d6292a6ce484ee588b172d2f84e2333a Reviewed-on: https://go-review.googlesource.com/c/go/+/282195 Trust: Michael Matloob Run-TryBot: Michael Matloob TryBot-Result: Go Bot Reviewed-by: Bryan C. Mills Reviewed-by: Jay Conrod --- diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 78f114f6af..d4303c2aad 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -840,6 +840,10 @@ // TestGoFiles []string // _test.go files in package // XTestGoFiles []string // _test.go files outside package // +// // Embedded files +// EmbedPatterns []string // //go:embed patterns +// EmbedFiles []string // files and directories matched by EmbedPatterns +// // // Cgo directives // CgoCFLAGS []string // cgo: flags for C compiler // CgoCPPFLAGS []string // cgo: flags for C preprocessor diff --git a/src/cmd/go/internal/list/list.go b/src/cmd/go/internal/list/list.go index ce6f579c05..61d3bc53d3 100644 --- a/src/cmd/go/internal/list/list.go +++ b/src/cmd/go/internal/list/list.go @@ -89,6 +89,10 @@ to -f '{{.ImportPath}}'. The struct being passed to the template is: TestGoFiles []string // _test.go files in package XTestGoFiles []string // _test.go files outside package + // Embedded files + EmbedPatterns []string // //go:embed patterns + EmbedFiles []string // files and directories matched by EmbedPatterns + // Cgo directives CgoCFLAGS []string // cgo: flags for C compiler CgoCPPFLAGS []string // cgo: flags for C preprocessor