serve nfs: rename types and methods which should be internal

This commit is contained in:
Nick Craig-Wood
2024-06-24 16:32:09 +01:00
parent 50d42babd8
commit 574378e871
3 changed files with 41 additions and 40 deletions

View File

@@ -4,6 +4,7 @@ package nfs
import (
"context"
"fmt"
"net"
nfs "github.com/willscott/go-nfs"
@@ -39,9 +40,9 @@ func NewServer(ctx context.Context, vfs *vfs.VFS, opt *Options) (s *Server, err
s.handler = newHandler(vfs, opt)
s.listener, err = net.Listen("tcp", s.opt.ListenAddr)
if err != nil {
fs.Errorf(nil, "NFS server failed to listen: %v\n", err)
return nil, fmt.Errorf("failed to open listening socket: %w", err)
}
return
return s, nil
}
// Addr returns the listening address of the server