Skip to content

Commit 15cb918

Browse files
committed
Fix lint
Signed-off-by: Matthew Heon <[email protected]>
1 parent ae9ad41 commit 15cb918

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

pkg/bindings/manifests/manifests.go

+7-9
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ func Add(ctx context.Context, name string, options *AddOptions) (string, error)
111111
func Remove(ctx context.Context, name, digest string, _ *RemoveOptions) (string, error) {
112112
optionsv4 := new(ModifyOptions).WithOperation("remove")
113113
return Modify(ctx, name, []string{digest}, optionsv4)
114-
115114
}
116115

117116
// 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
203202
return report.ID, &errModel
204203
}
205204
return report.ID, nil
206-
} else {
207-
errModel := errorhandling.ErrorModel{
208-
ResponseCode: response.StatusCode,
209-
}
210-
if err = jsoniter.Unmarshal(data, &errModel); err != nil {
211-
return "", errors.Wrap(err, "unable to decode API response")
212-
}
213-
return "", &errModel
214205
}
206+
errModel := errorhandling.ErrorModel{
207+
ResponseCode: response.StatusCode,
208+
}
209+
if err = jsoniter.Unmarshal(data, &errModel); err != nil {
210+
return "", errors.Wrap(err, "unable to decode API response")
211+
}
212+
return "", &errModel
215213
}
216214

217215
// Annotate modifies the given manifest list using options and the optional list of images

0 commit comments

Comments
 (0)