Manager: test error with errors.Is()
instead of ==
It's just a better way to test errors.
This commit is contained in:
parent
859a2e6eda
commit
cb6a3a5a88
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user