MCPcopy Create free account
hub / github.com/gogs/gogs / DeleteAttachment

Function DeleteAttachment

internal/database/attachment.go:160–163  ·  view source on GitHub ↗

DeleteAttachment deletes the given attachment and optionally the associated file.

(a *Attachment, remove bool)

Source from the content-addressed store, hash-verified

158
159// DeleteAttachment deletes the given attachment and optionally the associated file.
160func DeleteAttachment(a *Attachment, remove bool) error {
161 _, err := DeleteAttachments([]*Attachment{a}, remove)
162 return err
163}
164
165// DeleteAttachments deletes the given attachments and optionally the associated files.
166func DeleteAttachments(attachments []*Attachment, remove bool) (int, error) {

Callers

nothing calls this directly

Calls 1

DeleteAttachmentsFunction · 0.85

Tested by

no test coverage detected