summaryrefslogtreecommitdiff
path: root/src/embed/embed.go
diff options
context:
space:
mode:
authorAlexander Rakoczy <alex@golang.org>2020-12-14 11:42:42 -0500
committerAlexander Rakoczy <alex@golang.org>2020-12-14 11:42:42 -0500
commit267975dc4732b6f6a62a7d33a85de34efef180b7 (patch)
treefd69c51067a279d959b233b94bccf2bf969317a7 /src/embed/embed.go
parent63bc23b5452f6605df3e40ce7ecdd8b0348792af (diff)
parent6c64b6db6802818dd9a4789cdd564f19b70b6b4c (diff)
downloadgo-git-267975dc4732b6f6a62a7d33a85de34efef180b7.tar.gz
Merge branch 'master' into dev.regabi
Change-Id: I098acdbc5e2676aeb8700d935e796a9c29d04b88
Diffstat (limited to 'src/embed/embed.go')
-rw-r--r--src/embed/embed.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/embed/embed.go b/src/embed/embed.go
index b22975cc3a..29e0adf1a6 100644
--- a/src/embed/embed.go
+++ b/src/embed/embed.go
@@ -59,12 +59,15 @@
// as Go double-quoted or back-quoted string literals.
//
// If a pattern names a directory, all files in the subtree rooted at that directory are
-// embedded (recursively), so the variable in the above example is equivalent to:
+// embedded (recursively), except that files with names beginning with ‘.’ or ‘_’
+// are excluded. So the variable in the above example is almost equivalent to:
//
// // content is our static web server content.
// //go:embed image template html/index.html
// var content embed.FS
//
+// The difference is that ‘image/*’ embeds ‘image/.tempfile’ while ‘image’ does not.
+//
// The //go:embed directive can be used with both exported and unexported variables,
// depending on whether the package wants to make the data available to other packages.
// Similarly, it can be used with both global and function-local variables,