diff options
author | Matthew Heon <matthew.heon@pm.me> | 2022-02-17 12:32:51 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2022-02-17 12:34:05 -0500 |
commit | 15cb918556940e5bf5735cc726ae36968ccded15 (patch) | |
tree | 0bb7ffd05777123ec726c3f5a4a3850b1308a856 /pkg/bindings/manifests | |
parent | ae9ad416a35a23afd11426fb4a2e65e9b45bd22f (diff) | |
download | podman-15cb918556940e5bf5735cc726ae36968ccded15.tar.gz podman-15cb918556940e5bf5735cc726ae36968ccded15.tar.bz2 podman-15cb918556940e5bf5735cc726ae36968ccded15.zip |
Fix lint
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'pkg/bindings/manifests')
-rw-r--r-- | pkg/bindings/manifests/manifests.go | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/pkg/bindings/manifests/manifests.go b/pkg/bindings/manifests/manifests.go index b01aaea6e..18798e615 100644 --- a/pkg/bindings/manifests/manifests.go +++ b/pkg/bindings/manifests/manifests.go @@ -111,7 +111,6 @@ func Add(ctx context.Context, name string, options *AddOptions) (string, error) func Remove(ctx context.Context, name, digest string, _ *RemoveOptions) (string, error) { optionsv4 := new(ModifyOptions).WithOperation("remove") return Modify(ctx, name, []string{digest}, optionsv4) - } // Push takes a manifest list and pushes to a destination. If the destination is not specified, @@ -203,15 +202,14 @@ func Modify(ctx context.Context, name string, images []string, options *ModifyOp return report.ID, &errModel } return report.ID, nil - } else { - errModel := errorhandling.ErrorModel{ - ResponseCode: response.StatusCode, - } - if err = jsoniter.Unmarshal(data, &errModel); err != nil { - return "", errors.Wrap(err, "unable to decode API response") - } - return "", &errModel } + errModel := errorhandling.ErrorModel{ + ResponseCode: response.StatusCode, + } + if err = jsoniter.Unmarshal(data, &errModel); err != nil { + return "", errors.Wrap(err, "unable to decode API response") + } + return "", &errModel } // Annotate modifies the given manifest list using options and the optional list of images |