Skip to content

Commit d35c6f5

Browse files
status: apply functional options on subServer init
1 parent 7bd2f1a commit d35c6f5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

status/manager.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,15 @@ type subServer struct {
5555

5656
// newSubServer constructs a new subServer.
5757
func newSubServer(disabled bool, opts ...SubServerOption) *subServer {
58-
return &subServer{
58+
s := &subServer{
5959
disabled: disabled,
6060
}
61+
62+
for _, opt := range opts {
63+
opt(s)
64+
}
65+
66+
return s
6167
}
6268

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

0 commit comments

Comments
 (0)