oci: simplify WithImageConfig
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
parent
b99dc56817
commit
1645d8406d
@ -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
|
// if we cannot parse as a uint they try to see if it is a username
|
||||||
return WithUsername(config.User)(ctx, client, c, s)
|
return WithUsername(config.User)(ctx, client, c, s)
|
||||||
}
|
}
|
||||||
if err := WithUserID(uint32(v))(ctx, client, c, s); err != nil {
|
return WithUserID(uint32(v))(ctx, client, c, s)
|
||||||
return err
|
|
||||||
}
|
|
||||||
case 2:
|
case 2:
|
||||||
// TODO: support username and groupname
|
// TODO: support username and groupname
|
||||||
v, err := strconv.Atoi(parts[0])
|
v, err := strconv.Atoi(parts[0])
|
||||||
|
Loading…
Reference in New Issue
Block a user