Skip to content

Commit

Permalink
kubeconfig: For string conversion use FormatUint instead Itoa
Browse files Browse the repository at this point in the history
This will fix follow golint ci warning
```
pkg/crc/machine/kubeconfig.go:189:29: G115: integer overflow conversion uint -> int (gosec)
					port = strconv.Itoa(int(ingressHTTPSPort))
```
  • Loading branch information
praveenkumar committed Sep 27, 2024
1 parent 15f4cef commit bdbe6e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/crc/machine/kubeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func getTokenForUser(username, password, ip string, ca []byte, clusterConfig *ty
return nil, err
}
if strings.HasSuffix(hostname, constants.AppsDomain) {
port = strconv.Itoa(int(ingressHTTPSPort))
port = strconv.FormatUint(uint64(ingressHTTPSPort), 10)
}
dialer := net.Dialer{
Timeout: 30 * time.Second,
Expand Down

0 comments on commit bdbe6e5

Please sign in to comment.