Skip to content

Commit

Permalink
Merge pull request #705 from ViktorTigerstrom/2024-01-initialize-subs…
Browse files Browse the repository at this point in the history
…ervers-with-functional-opts

status: apply functional options on subServer init
  • Loading branch information
guggero authored Jan 16, 2024
2 parents 7bd2f1a + d35c6f5 commit c03b040
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion status/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,15 @@ type subServer struct {

// newSubServer constructs a new subServer.
func newSubServer(disabled bool, opts ...SubServerOption) *subServer {
return &subServer{
s := &subServer{
disabled: disabled,
}

for _, opt := range opts {
opt(s)
}

return s
}

// Manager manages the status of any sub-server registered to it. It is also an
Expand Down

0 comments on commit c03b040

Please sign in to comment.