mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #61391 from hanxiaoshuai/fixtodo0320
Automatic merge from submit-queue (batch tested with PRs 60476, 62462, 61391, 62535, 62394). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Use function aws.Int64Value replace of deprecated function orZero **What this PR does / why we need it**: ``` // orZero returns the value, or 0 if the pointer is nil // Deprecated: prefer aws.Int64Value func orZero(v *int64) int64 { return aws.Int64Value(v) } ``` Use function aws.Int64Value replace of deprecated function orZero and remove unused orZero . **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
2196b0a074
@ -1027,10 +1027,10 @@ func (c *Cloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadBala
|
||||
if elbProtocolsAreEqual(actual.InstanceProtocol, expected.InstanceProtocol) {
|
||||
continue
|
||||
}
|
||||
if orZero(actual.InstancePort) != orZero(expected.InstancePort) {
|
||||
if aws.Int64Value(actual.InstancePort) != aws.Int64Value(expected.InstancePort) {
|
||||
continue
|
||||
}
|
||||
if orZero(actual.LoadBalancerPort) != orZero(expected.LoadBalancerPort) {
|
||||
if aws.Int64Value(actual.LoadBalancerPort) != aws.Int64Value(expected.LoadBalancerPort) {
|
||||
continue
|
||||
}
|
||||
if awsArnEquals(actual.SSLCertificateId, expected.SSLCertificateId) {
|
||||
|
@ -42,9 +42,3 @@ func stringSetFromPointers(in []*string) sets.String {
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// orZero returns the value, or 0 if the pointer is nil
|
||||
// Deprecated: prefer aws.Int64Value
|
||||
func orZero(v *int64) int64 {
|
||||
return aws.Int64Value(v)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user