Skip to content

Commit 2fc3320

Browse files
authored
Merge pull request #200 from jwilder/jw-dirlist
Make dirList return empty slice instead of error
2 parents 11ae0d3 + fb7d6db commit 2fc3320

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

template.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ func dirList(path string) ([]string, error) {
368368
names := []string{}
369369
files, err := ioutil.ReadDir(path)
370370
if err != nil {
371-
return names, err
371+
log.Printf("Template error: %v", err)
372+
return names, nil
372373
}
373374
for _, f := range files {
374375
names = append(names, f.Name())

0 commit comments

Comments
 (0)