oci: replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations: BenchmarkSprintf-10 37735996 32.31 ns/op 0 B/op 0 allocs/op BenchmarkItoa-10 591945836 2.031 ns/op 0 B/op 0 allocs/op BenchmarkFormatUint-10 593701444 2.014 ns/op 0 B/op 0 allocs/op Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
710d22366d
commit
06765c9ef5
@ -420,7 +420,7 @@ func WithImageConfigArgs(image Image, args []string) SpecOpts {
|
||||
if err := WithUser(config.User)(ctx, client, c, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return WithAdditionalGIDs(fmt.Sprintf("%d", s.Process.User.UID))(ctx, client, c, s)
|
||||
return WithAdditionalGIDs(strconv.FormatInt(int64(s.Process.User.UID), 10))(ctx, client, c, s)
|
||||
}
|
||||
// we should query the image's /etc/group for additional GIDs
|
||||
// even if there is no specified user in the image config
|
||||
|
Loading…
Reference in New Issue
Block a user