status: apply functional options on subServer init

This commit is contained in:
Viktor Tigerström 2024-01-15 20:09:22 +01:00
parent 7bd2f1a93c
commit d35c6f581b
No known key found for this signature in database
GPG key ID: B984570980684DCC

View file

@ -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