Skip to content

Commit 3507551

Browse files
dvrkpsmvdan
authored andcommitted
os/user: clean error message formatting
Change-Id: I02728c690a377ecdd2a6bc92d1606cbae3e2723a Reviewed-on: https://go-review.googlesource.com/c/go/+/196677 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
1 parent 0d9981b commit 3507551

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/os/user/lookup_stubs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func current() (*User, error) {
7272

7373
func listGroups(*User) ([]string, error) {
7474
if runtime.GOOS == "android" || runtime.GOOS == "aix" {
75-
return nil, errors.New(fmt.Sprintf("user: GroupIds not implemented on %s", runtime.GOOS))
75+
return nil, fmt.Errorf("user: GroupIds not implemented on %s", runtime.GOOS)
7676
}
7777
return nil, errors.New("user: GroupIds requires cgo")
7878
}

0 commit comments

Comments
 (0)