fs: Update comments
This commit is contained in:
parent
ad18ae601c
commit
af61c1b60a
@ -106,7 +106,6 @@ func (c *Client) Do(req *Request) (*Response, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) do(conn *tls.Conn, req *Request) (*Response, error) {
|
func (c *Client) do(conn *tls.Conn, req *Request) (*Response, error) {
|
||||||
|
|
||||||
// Write the request
|
// Write the request
|
||||||
w := bufio.NewWriter(conn)
|
w := bufio.NewWriter(conn)
|
||||||
|
|
||||||
|
4
fs.go
4
fs.go
@ -15,7 +15,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FileServer takes a filesystem and returns a Responder which uses that filesystem.
|
// FileServer takes a filesystem and returns a Responder which uses that filesystem.
|
||||||
// The returned Responder sanitizes paths before handling them.
|
// The returned Responder cleans paths before handling them.
|
||||||
//
|
//
|
||||||
// TODO: Use io/fs.FS when available.
|
// TODO: Use io/fs.FS when available.
|
||||||
func FileServer(fsys FS) Responder {
|
func FileServer(fsys FS) Responder {
|
||||||
@ -43,7 +43,7 @@ func (fsh fsHandler) Respond(w *ResponseWriter, r *Request) {
|
|||||||
|
|
||||||
// FS represents a filesystem.
|
// FS represents a filesystem.
|
||||||
//
|
//
|
||||||
// TODO: Replace with io/fs.FS when available
|
// TODO: Replace with io/fs.FS when available.
|
||||||
type FS interface {
|
type FS interface {
|
||||||
Open(name string) (File, error)
|
Open(name string) (File, error)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user