fix linter error

This commit is contained in:
Aleksandr Sergin 2019-08-23 19:44:35 +03:00 committed by Mike Farah
parent 5de2bea1b4
commit 7a28531f2f

4
yq.go
View File

@ -48,7 +48,7 @@ func MoveFile(sourcePath, destPath string) error {
if err != nil { if err != nil {
err = inputFile.Close() err = inputFile.Close()
if err != nil { if err != nil {
return fmt.Errorf("Failed close original file: %s", err) return fmt.Errorf("failed close original file: %s", err)
} }
return fmt.Errorf("couldn't open dest file: %s", err) return fmt.Errorf("couldn't open dest file: %s", err)
} }
@ -56,7 +56,7 @@ func MoveFile(sourcePath, destPath string) error {
_, err = io.Copy(outputFile, inputFile) _, err = io.Copy(outputFile, inputFile)
err = inputFile.Close() err = inputFile.Close()
if err != nil { if err != nil {
return fmt.Errorf("Failed close original file: %s", err) return fmt.Errorf("failed close original file: %s", err)
} }
if err != nil { if err != nil {
return fmt.Errorf("writing to output file failed: %s", err) return fmt.Errorf("writing to output file failed: %s", err)