treewide: replace error comparisons and assertions with errors.Is

Change-Id: Id2424eb155f2c6842c72c5fafd124d428ef901f2
Reviewed-on: https://review.monogon.dev/c/monogon/+/2994
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/cloud/shepherd/mini/main.go b/cloud/shepherd/mini/main.go
index 67231c0..b35c09e 100644
--- a/cloud/shepherd/mini/main.go
+++ b/cloud/shepherd/mini/main.go
@@ -3,6 +3,7 @@
 import (
 	"context"
 	"encoding/json"
+	"errors"
 	"flag"
 	"fmt"
 	"io"
@@ -182,7 +183,7 @@
 		}
 	}()
 	go func() {
-		if err := c.WebugConfig.Start(ctx, conn); err != nil && err != ctx.Err() {
+		if err := c.WebugConfig.Start(ctx, conn); err != nil && !errors.Is(err, ctx.Err()) {
 			klog.Exitf("Failed to start webug: %v", err)
 		}
 	}()
diff --git a/cloud/shepherd/provider/equinix/main.go b/cloud/shepherd/provider/equinix/main.go
index 0060502..7faee9d 100644
--- a/cloud/shepherd/provider/equinix/main.go
+++ b/cloud/shepherd/provider/equinix/main.go
@@ -2,6 +2,7 @@
 
 import (
 	"context"
+	"errors"
 	"flag"
 	"fmt"
 	"os"
@@ -146,7 +147,7 @@
 		}
 	}()
 	go func() {
-		if err := c.WebugConfig.Start(ctx, conn); err != nil && err != ctx.Err() {
+		if err := c.WebugConfig.Start(ctx, conn); err != nil && !errors.Is(err, ctx.Err()) {
 			klog.Exitf("Failed to start webug: %v", err)
 		}
 	}()
diff --git a/cloud/shepherd/provider/equinix/provider.go b/cloud/shepherd/provider/equinix/provider.go
index 22cf8fa..ebd9699 100644
--- a/cloud/shepherd/provider/equinix/provider.go
+++ b/cloud/shepherd/provider/equinix/provider.go
@@ -2,6 +2,7 @@
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"net/netip"
 	"slices"
@@ -342,13 +343,13 @@
 // generated as needed The key is generated as needed
 func (ep *equinixProvider) SSHEquinixEnsure(ctx context.Context) error {
 	k, err := ep.sshEquinix(ctx)
-	switch err {
-	case NoSuchKey:
+	switch {
+	case errors.Is(err, NoSuchKey):
 		if err := ep.sshEquinixUpload(ctx); err != nil {
 			return fmt.Errorf("while uploading key: %w", err)
 		}
 		return nil
-	case nil:
+	case err == nil:
 		if err := ep.sshEquinixUpdate(ctx, k.ID); err != nil {
 			return fmt.Errorf("while updating key: %w", err)
 		}