Skip to content

Commit

Permalink
Skip directories when collecting data
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsauter committed Oct 25, 2023
1 parent 8b9784b commit 4060de7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/render/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ func collectDataFromMatchingFiles(baseDir, glob string, data map[string]interfac
}
defer f.Close()

fInfo, err := f.Stat()
if err != nil {
return err
}
if fInfo.IsDir() {
continue
}

dec := decoderFunc(f)
err = dec.Decode(&fileData)
if err != nil {
Expand Down

0 comments on commit 4060de7

Please sign in to comment.