aboutsummaryrefslogtreecommitdiff
path: root/src/embed
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2021-02-08 14:01:08 -0500
committerCherry Zhang <cherryyz@google.com>2021-02-08 14:01:08 -0500
commit50449de66aad9997690f40680cbca4ba26a41628 (patch)
treee0bd9207cd647415db62dc6ea4e31ce7018f1d76 /src/embed
parent7b0dfb177f3ae81641af898bb5479256fb21fd5d (diff)
parent1901853098bbe25a1bbedc0ee53c6658d754151e (diff)
downloadgo-50449de66aad9997690f40680cbca4ba26a41628.tar.gz
go-50449de66aad9997690f40680cbca4ba26a41628.zip
[dev.regabi] all: merge master (1901853) into dev.regabi
Merge List: + 2021-02-08 1901853098 runtime/metrics: fix panic in readingAllMetric example + 2021-02-08 ed3e4afa12 syscall/plan9: remove spooky fd action at a distance + 2021-02-05 724d0720b3 doc/go1.16: add missed heading tag in vet section + 2021-02-05 b54cd94d47 embed, io/fs: clarify that leading and trailing slashes are disallowed + 2021-02-05 4516afebed testing/fstest: avoid symlink-induced failures in tester + 2021-02-04 8869086d8f runtime: fix typo in histogram.go + 2021-02-03 e491c6eea9 math/big: fix comment in divRecursiveStep Change-Id: I5e2bd18f42251eeb4ad0bf5c93a08c6a9b873d7b
Diffstat (limited to 'src/embed')
-rw-r--r--src/embed/embed.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/embed/embed.go b/src/embed/embed.go
index 5f984aaf71..7f2719d2a7 100644
--- a/src/embed/embed.go
+++ b/src/embed/embed.go
@@ -61,12 +61,15 @@
// The Go build system will recognize the directives and arrange for the declared variable
// (in the example above, content) to be populated with the matching files from the file system.
//
-// The //go:embed directive accepts multiple space-separated patterns for brevity,
-// but it can also be repeated, to avoid very long lines when there are many patterns.
-// The patterns are interpreted relative to the package directory containing the source file.
-// The path separator is a forward slash, even on Windows systems.
-// To allow for naming files with spaces in their names, patterns can be written
-// as Go double-quoted or back-quoted string literals.
+// The //go:embed directive accepts multiple space-separated patterns for
+// brevity, but it can also be repeated, to avoid very long lines when there are
+// many patterns. The patterns are interpreted relative to the package directory
+// containing the source file. The path separator is a forward slash, even on
+// Windows systems. Patterns may not contain ‘.’ or ‘..’ or empty path elements,
+// nor may they begin or end with a slash. To match everything in the current
+// directory, use ‘*’ instead of ‘.’. To allow for naming files with spaces in
+// their names, patterns can be written 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), except that files with names beginning with ‘.’ or ‘_’
@@ -87,9 +90,6 @@
// Matches for empty directories are ignored. After that, each pattern in a //go:embed line
// must match at least one file or non-empty directory.
//
-// Patterns must not contain ‘.’ or ‘..’ path elements nor begin with a leading slash.
-// To match everything in the current directory, use ‘*’ instead of ‘.’.
-//
// If any patterns are invalid or have invalid matches, the build will fail.
//
// Strings and Bytes