aboutsummaryrefslogtreecommitdiff
path: root/src/os/path.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2020-07-03 12:25:49 -0400
committerRuss Cox <rsc@golang.org>2020-10-20 00:59:22 +0000
commit2291cae2af659876e93a3e1f95c708abb1475d02 (patch)
treee5140b7c1d3a0a7d5206e5b261a6ef2aa5d98891 /src/os/path.go
parenta4ede9f9a6254360d39d0f45aec133c355ac6b2a (diff)
downloadgo-2291cae2af659876e93a3e1f95c708abb1475d02.tar.xz
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>
Diffstat (limited to 'src/os/path.go')
-rw-r--r--src/os/path.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os/path.go b/src/os/path.go
index ba43ea3525..df87887b9b 100644
--- a/src/os/path.go
+++ b/src/os/path.go
@@ -22,7 +22,7 @@ func MkdirAll(path string, perm FileMode) error {
if dir.IsDir() {
return nil
}
- return &PathError{"mkdir", path, syscall.ENOTDIR}
+ return &PathError{Op: "mkdir", Path: path, Err: syscall.ENOTDIR}
}
// Slow path: make sure parent exists and then call Mkdir for path.