From 0a6db1fa55b8e8303e0f7a93588e0bb398685b2b Mon Sep 17 00:00:00 2001 From: "James W. Brinkerhoff" Date: Tue, 29 Oct 2024 10:06:38 -0400 Subject: [PATCH] providers/supermicro/supermicro.go: Explain why we return nil in NewClient() --- providers/supermicro/supermicro.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/providers/supermicro/supermicro.go b/providers/supermicro/supermicro.go index 7d6b44df..6fc9b50a 100644 --- a/providers/supermicro/supermicro.go +++ b/providers/supermicro/supermicro.go @@ -144,6 +144,9 @@ func NewClient(host, user, pass string, log logr.Logger, opts ...Option) *Client httpclient.Build(defaultConfig.httpClientSetupFuncs...), ) + // We probably want to treat this as a fatal error and/or pass the error back to the caller + // I did not want to chase that thread atm, so we intentionally return nil here if + // newBmcServiceClient returns an error. if err != nil { return nil }