From: tulip Date: Tue, 21 Jun 2022 16:42:29 +0000 (+0800) Subject: embed: document additional file name restrictions X-Git-Tag: go1.19rc1~74 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=15605ca827723d568f780402d03b29842fd20eec;p=gostls13.git embed: document additional file name restrictions For #44486 Change-Id: I66af9f7a9f95489a41fd6710e50bdd7878f78b85 Reviewed-on: https://go-review.googlesource.com/c/go/+/413494 Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot Reviewed-by: Dmitri Shuralyov Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- diff --git a/src/embed/embed.go b/src/embed/embed.go index cbe2d398fb..c54b961d15 100644 --- a/src/embed/embed.go +++ b/src/embed/embed.go @@ -91,6 +91,7 @@ // It can only be used with variables at package scope, not with local variables. // // Patterns must not match files outside the package's module, such as ‘.git/*’ or symbolic links. +// Patterns must not match files whose names include the special punctuation characters " * < > ? ` ' | / \ and :. // 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. //