Skip to content

Commit c03b040

Browse files
authored
Merge pull request #705 from ViktorTigerstrom/2024-01-initialize-subservers-with-functional-opts
status: apply functional options on subServer init
2 parents 7bd2f1a + d35c6f5 commit c03b040

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)