Skip to content

Commit

Permalink
fix: uint conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
FemiNoviaLina committed Oct 22, 2024
1 parent 05d7fec commit 9dd6a59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/proxy/envoy/xds/ads/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,10 @@ func resolveHostPort(urlString string) (string, uint32, error) {
}
}

intPort, err := strconv.Atoi(port)
uintPort, err := strconv.ParseUint(port, 10, 32)
if err != nil {
return "", 0, err
}

return parsed.Hostname(), uint32(intPort), nil
return parsed.Hostname(), uint32(uintPort), nil
}

0 comments on commit 9dd6a59

Please sign in to comment.