From 8ee8420408e4fc0f52ae34503bd9bd99d95d6bfe Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Mon, 15 Mar 2021 11:49:03 +0100 Subject: [PATCH] simplify return --- hcl2template/formatter.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hcl2template/formatter.go b/hcl2template/formatter.go index 059f91d28..d59a9eb8f 100644 --- a/hcl2template/formatter.go +++ b/hcl2template/formatter.go @@ -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)