commit 49d578b3bf0353f3a4138063fe7834d8a662fd57
parent d084bbd3e61eecdf4d9a6ed40742c83847fd22c3
Author: Matsuda Kenji <info@mtkn.jp>
Date: Tue, 9 Jan 2024 12:23:29 +0900
update comment
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/server.go b/server.go
@@ -46,8 +46,8 @@ type Server struct {
Auth func(ctx context.Context, r *request)
}
-// NewServer creates a Server and runs listener and responder goroutines.
-// It reads incoming messages from r and writes responses to w.
+// NewServer creates a Server.
+// It serves fsys with the aname "".
func NewServer(fsys FS) *Server {
s := &Server{
fsmap: map[string]FS{"": fsys},
@@ -55,6 +55,8 @@ func NewServer(fsys FS) *Server {
return s
}
+// NewServerMap creates a Server.
+// Fsmap is the map of aname-FS pair.
func NewServerMap(fsmap map[string]FS) *Server {
s := &Server{
fsmap: fsmap,