From: Davor Kapsa Date: Fri, 20 Sep 2019 12:05:20 +0000 (+0200) Subject: os/user: clean error message formatting X-Git-Tag: go1.14beta1~1028 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3507551a1f0d34d567d77242b68bf19b00caf9b7;p=gostls13.git os/user: clean error message formatting 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 --- 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") }