Rename variable error to err

`error` is the keywork in golang

Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
Dave Chen 2022-02-24 15:11:00 +08:00
parent 85dfca3e16
commit 09e47291c7

View File

@ -81,12 +81,12 @@ func Read(filePath string) ([]byte, error) {
}
// Here we try to generate an error that points test authors
// or users in the right direction for resolving the problem.
error := fmt.Sprintf("Test file %q was not found.\n", filePath)
err := fmt.Sprintf("Test file %q was not found.\n", filePath)
for _, filesource := range filesources {
error += filesource.DescribeFiles()
error += "\n"
err += filesource.DescribeFiles()
err += "\n"
}
return nil, errors.New(error)
return nil, errors.New(err)
}
// Exists checks whether a file could be read. Unexpected errors