Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Commit

Permalink
adding a few missing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
paganotoni committed Apr 16, 2024
1 parent 78ce3c9 commit 14354a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/option.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package server

// Options for the server
type Option func(*mux)

// WithHost allows to specify the host to run the server at
// if not specified it defaults to 0.0.0.0
func WithHost(host string) Option {
return func(s *mux) {
s.host = host
}
}

// WithPort allows to specify the port to run the server at
// when not specified it defaults to 3000
func WithPort(port string) Option {
return func(s *mux) {
s.port = port
Expand Down

0 comments on commit 14354a8

Please sign in to comment.