Skip to content

Commit 71040b2

Browse files
committed
refactor: use errors.Is()
1 parent ea6f76b commit 71040b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/driver/f5/declaration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ func buildAS3Declaration(f5Config config.F5Config, s AndromedaF5Store, ctbFunc a
5454
for _, domain := range domains {
5555
domainTenant, domainTenantRPCUpdates, err := dtbFunc(f5Config, datacentersByID, domain)
5656
// not a soft error: the declaration cannot be built
57-
if err != nil && err != errEntityPendingDeletion {
57+
if err != nil && !errors.Is(err, errEntityPendingDeletion) {
5858
return adc, rpcRequest, err
5959
}
6060
// only the active domains may be included in the declaration.
6161
// domains pending deletion are excluded (and thus deleted by AS3).
62-
if err != errEntityPendingDeletion {
62+
if !errors.Is(err, errEntityPendingDeletion) {
6363
adc.AddTenant(as3DeclarationGSLBDomainTenantKey(domain.Id), domainTenant)
6464
}
6565
rpcUpdates = append(rpcUpdates, domainTenantRPCUpdates...)

0 commit comments

Comments
 (0)