(e Engine, uuid string)
| 101 | } |
| 102 | |
| 103 | func getAttachmentByUUID(e Engine, uuid string) (*Attachment, error) { |
| 104 | attach := &Attachment{UUID: uuid} |
| 105 | has, err := e.Get(attach) |
| 106 | if err != nil { |
| 107 | return nil, err |
| 108 | } else if !has { |
| 109 | return nil, ErrAttachmentNotExist{args: map[string]any{"uuid": uuid}} |
| 110 | } |
| 111 | return attach, nil |
| 112 | } |
| 113 | |
| 114 | func getAttachmentsByUUIDs(e Engine, uuids []string) ([]*Attachment, error) { |
| 115 | if len(uuids) == 0 { |
no test coverage detected