Skip to content

Commit a69ef37

Browse files
committed
address linter issues
1 parent d7778bf commit a69ef37

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dhcp/dhcp_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ func (c *DHCP) DHCPRehydrationFeatureOnHost(ctx context.Context) (bool, error) {
475475
resp *http.Response
476476
httpClient = &http.Client{Timeout: DefaultTimeout}
477477
)
478-
req, err := http.NewRequestWithContext(ctx, http.MethodGet, nmAgentSupportedApisURL, nil)
478+
req, err := http.NewRequestWithContext(ctx, http.MethodGet, nmAgentSupportedApisURL, http.NoBody)
479479
if err != nil {
480480
return false, errors.Wrap(err, "failed to create http request")
481481
}
@@ -489,11 +489,11 @@ func (c *DHCP) DHCPRehydrationFeatureOnHost(ctx context.Context) (bool, error) {
489489
if resp.StatusCode != http.StatusOK {
490490
return false, errResponseNotOK
491491
}
492-
bytes, err := io.ReadAll(resp.Body)
492+
readBytes, err := io.ReadAll(resp.Body)
493493
if err != nil {
494494
return false, errors.Wrap(err, "failed to read response body")
495495
}
496-
str := string(bytes)
496+
str := string(readBytes)
497497
if !strings.Contains(str, dhcpRehydrationAPIStr) {
498498
return false, nil
499499
}

dhcp/dhcp_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ func (c *DHCP) DiscoverRequest(_ context.Context, _ net.HardwareAddr, _ string)
2121
return nil
2222
}
2323

24-
func (c *DHCP) DHCPRehydrationFeatureOnHost(ctx context.Context) (bool, error) {
24+
func (c *DHCP) DHCPRehydrationFeatureOnHost(_ context.Context) (bool, error) {
2525
return false, nil
2626
}

0 commit comments

Comments
 (0)