@@ -111,7 +111,6 @@ func Add(ctx context.Context, name string, options *AddOptions) (string, error)
111
111
func Remove (ctx context.Context , name , digest string , _ * RemoveOptions ) (string , error ) {
112
112
optionsv4 := new (ModifyOptions ).WithOperation ("remove" )
113
113
return Modify (ctx , name , []string {digest }, optionsv4 )
114
-
115
114
}
116
115
117
116
// 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
203
202
return report .ID , & errModel
204
203
}
205
204
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
214
205
}
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
215
213
}
216
214
217
215
// Annotate modifies the given manifest list using options and the optional list of images
0 commit comments