path/filepath: document and test behavior of SkipDir on files
This behavior is not what we might have designed from the start, but it has been present since Go 1. Rather than make a visible behavioral change that might cause programs to work differently in Go ≤1.4 vs Go ≥1.5, document what SkipDir on a non-directory has always meant. If code doesn't want this meaning, it is easy enough not to return SkipDir on non-directories. Fixes #10533. Change-Id: Ic0612f032044bc7c69bf62583a02037e4b47530b Reviewed-on: https://go-review.googlesource.com/11690Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
Showing
Please register or sign in to comment