Skip to content

Commit 7f9c00e

Browse files
authored
Merge pull request #109 from Nattfarinn/patch-2
Update formatting for mistake #11
2 parents 8e08283 + 9bc9149 commit 7f9c00e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ type Option func(options *options) error
229229
func WithPort(port int) Option {
230230
return func(options *options) error {
231231
if port < 0 {
232-
return errors.New("port should be positive")
233-
}
234-
options.port = &port
235-
return nil
232+
return errors.New("port should be positive")
233+
}
234+
options.port = &port
235+
return nil
236236
}
237237
}
238238

@@ -251,7 +251,7 @@ func NewServer(addr string, opts ...Option) ( *http.Server, error) {
251251
if options.port == nil {
252252
port = defaultHTTPPort
253253
} else {
254-
if *options.port == 0 {
254+
if *options.port == 0 {
255255
port = randomPort()
256256
} else {
257257
port = *options.port

0 commit comments

Comments
 (0)