From d35c6f581b9da27d72e1e67cad7eee8d2f7c3a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Tigerstr=C3=B6m?= Date: Mon, 15 Jan 2024 20:09:22 +0100 Subject: [PATCH] status: apply functional options on subServer init --- status/manager.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/status/manager.go b/status/manager.go index cb2f2befc..38ca29c53 100644 --- a/status/manager.go +++ b/status/manager.go @@ -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