]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: add documentation for Embed fields in go list output
authorMichael Matloob <matloob@golang.org>
Thu, 7 Jan 2021 03:13:45 +0000 (22:13 -0500)
committerMichael Matloob <matloob@golang.org>
Thu, 7 Jan 2021 18:56:09 +0000 (18:56 +0000)
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 <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/list/list.go

index 78f114f6afe3b14d2ca720983576b1f7e8c443ba..d4303c2aad239148f8007de8b2fa65f2d3d93f2b 100644 (file)
 //         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
index ce6f579c0583dc0151c0519aaf06cac71d652a0a..61d3bc53d33ca2149c07ae8d3408df7cea5f0cba 100644 (file)
@@ -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