Prefer errors.Is for os existence checks

Proprietary

Replace deprecated os.IsNotExist(err) with errors.Is(err, fs.ErrNotExist) and os.IsExist(err) with errors.Is(err, fs.ErrExist) (Go 1.16+).

org.openrewrite.golang.codequality.PreferErrorsIsForOsCheck
mod run . --recipe=org.openrewrite.golang.codequality.PreferErrorsIsForOsCheck

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.