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

Function getAttachmentsByUUIDs

internal/database/attachment.go:114–122  ·  view source on GitHub ↗
(e Engine, uuids []string)

Source from the content-addressed store, hash-verified

112}
113
114func getAttachmentsByUUIDs(e Engine, uuids []string) ([]*Attachment, error) {
115 if len(uuids) == 0 {
116 return []*Attachment{}, nil
117 }
118
119 // Silently drop invalid uuids.
120 attachments := make([]*Attachment, 0, len(uuids))
121 return attachments, e.In("uuid", uuids).Find(&attachments)
122}
123
124// GetAttachmentByUUID returns attachment by given UUID.
125func GetAttachmentByUUID(uuid string) (*Attachment, error) {

Callers 1

newIssueFunction · 0.85

Calls 2

InMethod · 0.80
FindMethod · 0.65

Tested by

no test coverage detected