summaryrefslogtreecommitdiff
path: root/src/embed/embed.go
diff options
context:
space:
mode:
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,