Skip to content

Commit 8a7343c

Browse files
committed
Merge pull request pkg#81 from pkg/server-option
server: return ServerOption for godoc documentation
2 parents d396b1b + 7d53b6d commit 8a7343c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ func NewServer(in io.Reader, out io.WriteCloser, rootDir string, options ...Serv
114114
type ServerOption func(*Server) error
115115

116116
// WithDebug enables Server debugging output to the supplied io.Writer.
117-
func WithDebug(w io.Writer) func(*Server) error {
117+
func WithDebug(w io.Writer) ServerOption {
118118
return func(s *Server) error {
119119
s.debugStream = w
120120
return nil
121121
}
122122
}
123123

124124
// ReadOnly configures a Server to serve files in read-only mode.
125-
func ReadOnly() func(*Server) error {
125+
func ReadOnly() ServerOption {
126126
return func(s *Server) error {
127127
s.readOnly = true
128128
return nil

0 commit comments

Comments
 (0)