From 2291cae2af659876e93a3e1f95c708abb1475d02 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 3 Jul 2020 12:25:49 -0400 Subject: 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 Run-TryBot: Russ Cox Reviewed-by: Rob Pike Reviewed-by: Ian Lance Taylor --- src/os/path.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/os/path.go') 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. -- cgit v1.2.1