]> Cypherpunks repositories - gostls13.git/commit
io/fs: add ReadFile and ReadFileFS
authorRuss Cox <rsc@golang.org>
Mon, 6 Jul 2020 15:26:26 +0000 (11:26 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 20 Oct 2020 17:52:55 +0000 (17:52 +0000)
commitf098ccf04a33e2e4d2dffa2e90fe77ca8a0fcbb4
treea478de6a5075d156a273bda1614bd506e13664d3
parentb1f76f7a220a806d74bf55da374ea89467753e1f
io/fs: add ReadFile and ReadFileFS

Add ReadFile helper function, ReadFileFS interface, and test.
Add ReadFile method to fstest.MapFS.
Add testing of ReadFile method to fstest.TestFS.

For #41190.

Change-Id: I5b6a41e2e582824e570463b698b635abaa436c32
Reviewed-on: https://go-review.googlesource.com/c/go/+/243912
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/go/build/deps_test.go
src/io/fs/readfile.go [new file with mode: 0644]
src/io/fs/readfile_test.go [new file with mode: 0644]
src/testing/fstest/mapfs.go
src/testing/fstest/testfs.go