while looking at os.RemoveAll I came across following code snippet:
// Otherwise, is this a directory we need to recurse into? dir, serr := Lstat(path) if serr != nil {
if serr, ok := serr.(*PathError); ok && (IsNotExist(serr.Err) || serr.Err == syscall.ENOTDIR) {
return nil
}
return serr
}
I wonder why the returned error of Lstat is tested this way. According to
the docs (and the source code of Lstat) errors returned by Lstat are always
of type *PathError.
Regards,
Heiko
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.