mirror of
https://github.com/go-kratos/kratos.git
synced 2026-06-13 21:19:41 +02:00
d4bca5dd98
os.IsExist checks if an error indicates a file already exists (e.g., during creation), not if a file is present on disk. When os.Stat fails with "file not found", os.IsExist returns false, which happens to be correct but is semantically wrong. Replace with the idiomatic !errors.Is(err, fs.ErrNotExist) for clarity and correctness. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>