(entries []files.IsMetadata, matches []*files.SearchMatchV2, limit uint64)
| 147 | } |
| 148 | |
| 149 | func appendSearchMatches(entries []files.IsMetadata, matches []*files.SearchMatchV2, limit uint64) []files.IsMetadata { |
| 150 | for _, m := range matches { |
| 151 | if searchLimitReached(entries, limit) { |
| 152 | break |
| 153 | } |
| 154 | if m.Metadata != nil && m.Metadata.Metadata != nil { |
| 155 | entries = append(entries, m.Metadata.Metadata) |
| 156 | } |
| 157 | } |
| 158 | return entries |
| 159 | } |
| 160 | |
| 161 | func searchLimitReached(entries []files.IsMetadata, limit uint64) bool { |
| 162 | return limit > 0 && uint64(len(entries)) >= limit |
no test coverage detected