From 242d9d68f6213450299368e8a183e71ef0054c0f Mon Sep 17 00:00:00 2001 From: QxBytes Date: Mon, 6 Jan 2025 16:34:16 -0800 Subject: [PATCH] address linter issues --- dhcp/dhcp_linux.go | 6 +++--- dhcp/dhcp_windows.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dhcp/dhcp_linux.go b/dhcp/dhcp_linux.go index a86d642cf1..2c3499d074 100644 --- a/dhcp/dhcp_linux.go +++ b/dhcp/dhcp_linux.go @@ -475,7 +475,7 @@ func (c *DHCP) DHCPRehydrationFeatureOnHost(ctx context.Context) (bool, error) { resp *http.Response httpClient = &http.Client{Timeout: DefaultTimeout} ) - req, err := http.NewRequestWithContext(ctx, http.MethodGet, nmAgentSupportedApisURL, nil) + req, err := http.NewRequestWithContext(ctx, http.MethodGet, nmAgentSupportedApisURL, http.NoBody) if err != nil { return false, errors.Wrap(err, "failed to create http request") } @@ -489,11 +489,11 @@ func (c *DHCP) DHCPRehydrationFeatureOnHost(ctx context.Context) (bool, error) { if resp.StatusCode != http.StatusOK { return false, errResponseNotOK } - bytes, err := io.ReadAll(resp.Body) + readBytes, err := io.ReadAll(resp.Body) if err != nil { return false, errors.Wrap(err, "failed to read response body") } - str := string(bytes) + str := string(readBytes) if !strings.Contains(str, dhcpRehydrationAPIStr) { return false, nil } diff --git a/dhcp/dhcp_windows.go b/dhcp/dhcp_windows.go index 79b58ea16d..d40c01da32 100644 --- a/dhcp/dhcp_windows.go +++ b/dhcp/dhcp_windows.go @@ -21,6 +21,6 @@ func (c *DHCP) DiscoverRequest(_ context.Context, _ net.HardwareAddr, _ string) return nil } -func (c *DHCP) DHCPRehydrationFeatureOnHost(ctx context.Context) (bool, error) { +func (c *DHCP) DHCPRehydrationFeatureOnHost(_ context.Context) (bool, error) { return false, nil }