@@ -193,7 +193,7 @@ func DeleteAttachments(attachments []*Attachment, remove bool) (int, error) {
193
193
return 0 , nil
194
194
}
195
195
196
- var ids = make ([]int64 , 0 , len (attachments ))
196
+ ids : = make ([]int64 , 0 , len (attachments ))
197
197
for _ , a := range attachments {
198
198
ids = append (ids , a .ID )
199
199
}
@@ -216,7 +216,6 @@ func DeleteAttachments(attachments []*Attachment, remove bool) (int, error) {
216
216
// DeleteAttachmentsByIssue deletes all attachments associated with the given issue.
217
217
func DeleteAttachmentsByIssue (issueID int64 , remove bool ) (int , error ) {
218
218
attachments , err := GetAttachmentsByIssueID (issueID )
219
-
220
219
if err != nil {
221
220
return 0 , err
222
221
}
@@ -227,7 +226,6 @@ func DeleteAttachmentsByIssue(issueID int64, remove bool) (int, error) {
227
226
// DeleteAttachmentsByComment deletes all attachments associated with the given comment.
228
227
func DeleteAttachmentsByComment (commentID int64 , remove bool ) (int , error ) {
229
228
attachments , err := GetAttachmentsByCommentID (commentID )
230
-
231
229
if err != nil {
232
230
return 0 , err
233
231
}
@@ -263,7 +261,7 @@ func IterateAttachment(f func(attach *Attachment) error) error {
263
261
var start int
264
262
const batchSize = 100
265
263
for {
266
- var attachments = make ([]* Attachment , 0 , batchSize )
264
+ attachments : = make ([]* Attachment , 0 , batchSize )
267
265
if err := x .Limit (batchSize , start ).Find (& attachments ); err != nil {
268
266
return err
269
267
}
0 commit comments