1
0
mirror of https://github.com/golang/go synced 2024-11-19 09:54:49 -07:00

os/user: fix formatting of error group lookup message

It was failing like "unknown groupid ᎈ|" instead of "unknown groupid
5000" due to the conversion from int to string.

Updates #14806

Change-Id: I83e4b478ff628ad4053573a9f32b3fadce22e847
Reviewed-on: https://go-review.googlesource.com/20642
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Brad Fitzpatrick 2016-03-13 12:40:09 -07:00
parent d1341d6cf3
commit b55a5dbb8a

View File

@ -183,7 +183,7 @@ func lookupUnixGid(gid int) (*Group, error) {
return nil, fmt.Errorf("user: lookup groupid %d: %v", gid, err)
}
if result == nil {
return nil, UnknownGroupIdError(gid)
return nil, UnknownGroupIdError(strconv.Itoa(gid))
}
return buildGroup(&grp), nil
}