diff options
author | Mauri de Souza Meneguzzo <mauri870@gmail.com> | 2023-07-31 20:58:45 +0000 |
---|---|---|
committer | Damien Neil <dneil@google.com> | 2023-08-07 17:07:12 +0000 |
commit | 65d4723b49cedaf533a21845013814fc4d0a467f (patch) | |
tree | 723ac009be6d6f1b46bf21bddf550fd3aad0437c /api | |
parent | 4e728e5121140a61c5947b82740a68aaa96ebbe8 (diff) | |
download | go-65d4723b49cedaf533a21845013814fc4d0a467f.tar.gz go-65d4723b49cedaf533a21845013814fc4d0a467f.zip |
net/http: add ServeFileFS, FileServerFS, NewFileTransportFS
These new apis are analogous to ServeFile, FileServer and NewFileTransport respectively. The main difference is that these functions operate on an fs.FS.
Fixes #51971
Change-Id: Ie56b245b795eeb7edf613657578592306945469b
GitHub-Last-Rev: 26e75c0368f155a2299fbdcb72f47036b71a5e06
GitHub-Pull-Request: golang/go#61641
Reviewed-on: https://go-review.googlesource.com/c/go/+/513956
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/next/51971.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/api/next/51971.txt b/api/next/51971.txt new file mode 100644 index 0000000000..f884c3c079 --- /dev/null +++ b/api/next/51971.txt @@ -0,0 +1,3 @@ +pkg net/http, func ServeFileFS(ResponseWriter, *Request, fs.FS, string) #51971 +pkg net/http, func FileServerFS(fs.FS) Handler #51971 +pkg net/http, func NewFileTransportFS(fs.FS) RoundTripper #51971 |