From 3507551a1f0d34d567d77242b68bf19b00caf9b7 Mon Sep 17 00:00:00 2001 From: Davor Kapsa Date: Fri, 20 Sep 2019 14:05:20 +0200 Subject: [PATCH] os/user: clean error message formatting MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I02728c690a377ecdd2a6bc92d1606cbae3e2723a Reviewed-on: https://go-review.googlesource.com/c/go/+/196677 Reviewed-by: Daniel Martí Run-TryBot: Daniel Martí TryBot-Result: Gobot Gobot --- src/os/user/lookup_stubs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/user/lookup_stubs.go b/src/os/user/lookup_stubs.go index d3acbddd18..7164514828 100644 --- a/src/os/user/lookup_stubs.go +++ b/src/os/user/lookup_stubs.go @@ -72,7 +72,7 @@ func current() (*User, error) { func listGroups(*User) ([]string, error) { if runtime.GOOS == "android" || runtime.GOOS == "aix" { - return nil, errors.New(fmt.Sprintf("user: GroupIds not implemented on %s", runtime.GOOS)) + return nil, fmt.Errorf("user: GroupIds not implemented on %s", runtime.GOOS) } return nil, errors.New("user: GroupIds requires cgo") } -- 2.50.0