chore: print path when diff

main
sudo pacman -Syu 2022-11-27 01:08:34 +07:00
parent e8097aea19
commit 6463559962
No known key found for this signature in database
GPG Key ID: D6CB5C6C567C47B0
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ func (ft *Formatter) formatFile(path string) error {
}
if ft.isDiff {
if err := diff.Text("before", "after", pathBytes, formattedBytes, os.Stdout); err != nil {
if err := diff.Text(path+" before", path+" after", pathBytes, formattedBytes, os.Stdout); err != nil {
return fmt.Errorf("diff: failed to slices: %w", err)
}
}