mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
os: use keyed literals for PathError
Necessary to move PathError to io/fs. For #41190. Change-Id: I05e87675f38a22f0570d4366b751b6169f7a1b13 Reviewed-on: https://go-review.googlesource.com/c/go/+/243900 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
a4ede9f9a6
commit
2291cae2af
17 changed files with 79 additions and 79 deletions
|
|
@ -50,7 +50,7 @@ func (f *File) readdir(n int, mode readdirMode) (names []string, dirents []DirEn
|
|||
d.nbuf, errno = f.pfd.ReadDirent(d.buf)
|
||||
runtime.KeepAlive(f)
|
||||
if errno != nil {
|
||||
return names, dirents, infos, &PathError{"readdirent", f.name, errno}
|
||||
return names, dirents, infos, &PathError{Op: "readdirent", Path: f.name, Err: errno}
|
||||
}
|
||||
if d.nbuf <= 0 {
|
||||
break // EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue