1
0
mirror of https://github.com/go-kratos/kratos.git synced 2026-06-13 21:19:41 +02:00
Files
longXboy d4bca5dd98 fix(cmd): use errors.Is for path existence check in pathExists
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>
2026-02-27 17:37:15 +08:00
..