mirror of
https://github.com/golang/go
synced 2024-11-05 14:46:11 -07:00
ead0a56930
mapfs.New documentation says: > Map keys should be forward slash-separated pathnames > and not contain a leading slash. It is invalid input if a provided path contains a leading slash, and it causes the returned filesystem to have undefined behavior. Package mapfs is often used in tests, so this can lead to a serious problem elsewhere. Help detect invalid API usage sooner by validating input, and panicking when it contains leading slashes. Programs that use mapfs API correctly will be unaffected, and it will be faster for incorrect programs—if any exist today or will be created in the future—to detect and correct such problems. Fixes golang/go#34591. Change-Id: I77e5f0f4628edf83480604135f58bfb62e521d80 Reviewed-on: https://go-review.googlesource.com/c/tools/+/197859 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> |
||
---|---|---|
.. | ||
gatefs | ||
httpfs | ||
mapfs | ||
zipfs | ||
emptyvfs.go | ||
namespace_test.go | ||
namespace.go | ||
os_test.go | ||
os.go | ||
vfs.go |