A function created for filepath.Walk in the blog package accepts an error
as its third argument, but then does nothing with it. This change picks up
the dropped error and returns it should it be non-nil.

Change-Id: I68786f7f1f2accbe527994e2d3e7b2f3da257a2d
GitHub-Last-Rev: d740e91601
GitHub-Pull-Request: golang/tools#183
Reviewed-on: https://go-review.googlesource.com/c/tools/+/203884
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
Lars Lehtonen 2019-12-18 18:59:00 +00:00 коммит произвёл Dmitri Shuralyov
Родитель d270ebf96e
Коммит 61f5e7d299
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -188,6 +188,9 @@ func (s *Server) loadDocs(root string) error {
// Read content into docs field.
const ext = ".article"
fn := func(p string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if filepath.Ext(p) != ext {
return nil
}