Skip to content

Commit

Permalink
address linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
QxBytes committed Jan 7, 2025
1 parent 20d2f1b commit 242d9d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dhcp/dhcp_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand All @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion dhcp/dhcp_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 242d9d6

Please sign in to comment.