From 7cee66d4cb6e726c6c37798583ac0b86c8743f82 Mon Sep 17 00:00:00 2001 From: Michael Matloob Date: Wed, 6 Jan 2021 22:13:45 -0500 Subject: [PATCH] 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 --- src/cmd/go/alldocs.go | 4 ++++ src/cmd/go/internal/list/list.go | 4 ++++ 2 files changed, 8 insertions(+) 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 -- 2.50.0