simplify return

This commit is contained in:
Adrien Delorme 2021-03-15 11:49:03 +01:00
parent 25ee6a19a6
commit 8ee8420408
1 changed files with 1 additions and 2 deletions

View File

@ -70,8 +70,7 @@ func (f *HCL2Formatter) Format(path string) (int, hcl.Diagnostics) {
}
if path == "-" {
bytesModified, diags = f.formatFile(path, diags, bytesModified)
return bytesModified, diags
return f.formatFile(path, diags, bytesModified)
}
isDir, err := isDir(path)