Commit f78c7d3d authored by hangaoshuai's avatar hangaoshuai

Use function aws.Int64Value replace of deprecated function orZero

parent 99d71456
...@@ -1027,10 +1027,10 @@ func (c *Cloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadBala ...@@ -1027,10 +1027,10 @@ func (c *Cloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadBala
if elbProtocolsAreEqual(actual.InstanceProtocol, expected.InstanceProtocol) { if elbProtocolsAreEqual(actual.InstanceProtocol, expected.InstanceProtocol) {
continue continue
} }
if orZero(actual.InstancePort) != orZero(expected.InstancePort) { if aws.Int64Value(actual.InstancePort) != aws.Int64Value(expected.InstancePort) {
continue continue
} }
if orZero(actual.LoadBalancerPort) != orZero(expected.LoadBalancerPort) { if aws.Int64Value(actual.LoadBalancerPort) != aws.Int64Value(expected.LoadBalancerPort) {
continue continue
} }
if awsArnEquals(actual.SSLCertificateId, expected.SSLCertificateId) { if awsArnEquals(actual.SSLCertificateId, expected.SSLCertificateId) {
......
...@@ -42,9 +42,3 @@ func stringSetFromPointers(in []*string) sets.String { ...@@ -42,9 +42,3 @@ func stringSetFromPointers(in []*string) sets.String {
} }
return out 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)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment