Manager: test error with errors.Is() instead of ==

It's just a better way to test errors.
This commit is contained in:
Sybren A. Stüvel 2022-07-26 17:23:31 +02:00
parent 859a2e6eda
commit cb6a3a5a88

View File

@ -41,7 +41,7 @@ func CheckBlender(ctx context.Context, exename string) (CheckBlenderResult, erro
// exename is not given, see if we can use .blend file association. // exename is not given, see if we can use .blend file association.
fullPath, err := fileAssociation() fullPath, err := fileAssociation()
switch { switch {
case err == ErrNotAvailable: case errors.Is(err, ErrNotAvailable):
// Association finder not available, act as if "blender" was given as exename. // Association finder not available, act as if "blender" was given as exename.
return CheckBlender(ctx, "blender") return CheckBlender(ctx, "blender")
case err != nil: case err != nil: