From 15cb918556940e5bf5735cc726ae36968ccded15 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 17 Feb 2022 12:32:51 -0500 Subject: Fix lint Signed-off-by: Matthew Heon --- pkg/bindings/manifests/manifests.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'pkg') 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 -- cgit v1.2.3-54-g00ecf