From 1645d8406d78bef4b50217c824b659b954d3d331 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Fri, 12 Jan 2018 15:46:53 +0900 Subject: [PATCH] oci: simplify WithImageConfig Signed-off-by: Akihiro Suda --- oci/spec_opts_unix.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/oci/spec_opts_unix.go b/oci/spec_opts_unix.go index 645db80d1..3c25c81b3 100644 --- a/oci/spec_opts_unix.go +++ b/oci/spec_opts_unix.go @@ -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])