Skip to content

Commit

Permalink
improve error info when open a file
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Mateus <rmateus@suse.com>
  • Loading branch information
rjmateus committed May 20, 2024
1 parent e8ad3ec commit 3a555b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func getProperty(filePaths []string, names []string) (string, error) {
func ScannerFunc(path string, search string) (string, error) {
f, err := os.Open(path)
if err != nil {
log.Fatal().Msgf("Couldn't open file: %s", path)
log.Fatal().Err(err).Msgf("Couldn't open file: %s", path)
}
defer f.Close()
scanner := bufio.NewScanner(f)
Expand Down

0 comments on commit 3a555b4

Please sign in to comment.