oci: simplify WithImageConfig

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
Akihiro Suda 2018-01-12 15:46:53 +09:00
parent b99dc56817
commit 1645d8406d

View File

@ -111,9 +111,7 @@ func WithImageConfig(image Image) SpecOpts {
// if we cannot parse as a uint they try to see if it is a username
return WithUsername(config.User)(ctx, client, c, s)
}
if err := WithUserID(uint32(v))(ctx, client, c, s); err != nil {
return err
}
return WithUserID(uint32(v))(ctx, client, c, s)
case 2:
// TODO: support username and groupname
v, err := strconv.Atoi(parts[0])