Skip to content

Commit

Permalink
fix unchecked err
Browse files Browse the repository at this point in the history
  • Loading branch information
rcrozean committed Sep 15, 2023
1 parent e6681ea commit 42899f6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/eksDistroBuildToolingOpsTools/pkg/git/gogitClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ func (g *GogitClient) ReadFiles(foldername string) (map[string]string, error) {
}

files := make(map[string]string)
tree.Files().ForEach(func(f *object.File) error {
err = tree.Files().ForEach(func(f *object.File) error {
if(strings.Contains(f.Name, foldername)) {
p, err := f.Contents()
if err != nil {
Expand All @@ -559,6 +559,9 @@ func (g *GogitClient) ReadFiles(foldername string) (map[string]string, error) {
}
return nil
})
if err != nil {
return nil, fmt.Errorf("reading files from folder: %s, %v", foldername, err)
}

return files, nil
}
Expand Down

0 comments on commit 42899f6

Please sign in to comment.