diff options
author | Jay Conrod <jayconrod@google.com> | 2021-02-05 16:45:40 -0500 |
---|---|---|
committer | Jay Conrod <jayconrod@google.com> | 2021-02-05 22:35:11 +0000 |
commit | b54cd94d478c95e79e5eea1d77e73d7b2b769f09 (patch) | |
tree | 88e50c1818d339ee09a87304211c07279aeed7ba /src/io | |
parent | 4516afebedd18692c6dc70cbdee16a049c26024b (diff) | |
download | go-b54cd94d478c95e79e5eea1d77e73d7b2b769f09.tar.gz go-b54cd94d478c95e79e5eea1d77e73d7b2b769f09.zip |
embed, io/fs: clarify that leading and trailing slashes are disallowed
Fixes #44012
Change-Id: I5782cea301a65ae12ba870ff1e6b2e0a2651dc09
Reviewed-on: https://go-review.googlesource.com/c/go/+/290071
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/io')
-rw-r--r-- | src/io/fs/fs.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/io/fs/fs.go b/src/io/fs/fs.go index b691a86049..c330f123ad 100644 --- a/src/io/fs/fs.go +++ b/src/io/fs/fs.go @@ -36,6 +36,7 @@ type FS interface { // sequences of path elements, like “x/y/z”. // Path names must not contain a “.” or “..” or empty element, // except for the special case that the root directory is named “.”. +// Leading and trailing slashes (like “/x” or “x/”) are not allowed. // // Paths are slash-separated on all systems, even Windows. // Backslashes must not appear in path names. |