]> Cypherpunks repositories - gostls13.git/commit
embed: implement FS
authorRuss Cox <rsc@golang.org>
Sun, 19 Jul 2020 03:50:48 +0000 (23:50 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 23 Oct 2020 00:22:00 +0000 (00:22 +0000)
commit400581b8b008ece8d0df34f54f281d365a175dba
tree096955e1ffd30257ca7c3739467098f012aefbb3
parent67bce7c1cf6540a853c6b8a9721e381c8258d7dc
embed: implement FS

embed.FS is the implementation of embedded file trees, providing
an fs.FS for each embed.FS variable.

Tests are in a follow-up CL, in the package embed/internal/embedtest.
(They can only be written once the toolchain can initialize one of these,
which requires changes to cmd/compile and cmd/go.)

For #41191.

Change-Id: Ieb0ead1d305cdac3d5d4e11772dca75740a72730
Reviewed-on: https://go-review.googlesource.com/c/go/+/243942
Trust: Russ Cox <rsc@golang.org>
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/embed/embed.go [new file with mode: 0644]
src/go/build/read_test.go