Skip to content

Commit

Permalink
Merge pull request #109 from Nattfarinn/patch-2
Browse files Browse the repository at this point in the history
Update formatting for mistake #11
  • Loading branch information
teivah authored Jan 17, 2025
2 parents 8e08283 + 9bc9149 commit 7f9c00e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ type Option func(options *options) error
func WithPort(port int) Option {
return func(options *options) error {
if port < 0 {
return errors.New("port should be positive")
}
options.port = &port
return nil
return errors.New("port should be positive")
}
options.port = &port
return nil
}
}

Expand All @@ -251,7 +251,7 @@ func NewServer(addr string, opts ...Option) ( *http.Server, error) {
if options.port == nil {
port = defaultHTTPPort
} else {
if *options.port == 0 {
if *options.port == 0 {
port = randomPort()
} else {
port = *options.port
Expand Down

0 comments on commit 7f9c00e

Please sign in to comment.