| commit | d5f851bb477638436826adec756fe562db526865 | [log] [tgz] |
|---|---|---|
| author | Tim Windelschmidt <tim@monogon.tech> | Tue Apr 23 14:59:37 2024 +0200 |
| committer | Tim Windelschmidt <tim@monogon.tech> | Wed Apr 24 13:15:14 2024 +0000 |
| tree | d981b1c62d613b45fb55023da289098d7e377705 | |
| parent | 69fec522d5db79d07bb1f227c2ab39c57fdf2831 [diff] [blame] |
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/metropolis/cli/metroctl/cmd_k8scredplugin.go b/metropolis/cli/metroctl/cmd_k8scredplugin.go index 9b3226e..adc3fe8 100644 --- a/metropolis/cli/metroctl/cmd_k8scredplugin.go +++ b/metropolis/cli/metroctl/cmd_k8scredplugin.go
@@ -4,6 +4,7 @@ "crypto/x509" "encoding/json" "encoding/pem" + "errors" "log" "os" @@ -27,7 +28,7 @@ func doK8sCredPlugin(cmd *cobra.Command, args []string) { cert, key, err := core.GetOwnerCredentials(flags.configPath) - if err == core.NoCredentialsError { + if errors.Is(err, core.NoCredentialsError) { log.Fatal("No credentials found on your machine") } if err != nil {