Skip to content

Commit

Permalink
status: apply functional options on subServer init
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorTigerstrom committed Jan 15, 2024
1 parent 7bd2f1a commit d35c6f5
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 d35c6f5

Please sign in to comment.