MCPcopy Index your code
hub / github.com/aptly-dev/aptly / Scan

Method Scan

deb/package_collection.go:302–317  ·  view source on GitHub ↗

Scan does full scan on all the packages

(q PackageQuery)

Source from the content-addressed store, hash-verified

300
301// Scan does full scan on all the packages
302func (collection *PackageCollection) Scan(q PackageQuery) (result *PackageList) {
303 result = NewPackageListWithDuplicates(true, 0)
304
305 for _, key := range collection.db.KeysByPrefix([]byte("P")) {
306 pkg, err := collection.ByKey(key)
307 if err != nil {
308 panic(fmt.Sprintf("unable to load package: %s", err))
309 }
310
311 if q.Matches(pkg) {
312 _ = result.Add(pkg)
313 }
314 }
315
316 return
317}
318
319// Search is not implemented
320func (collection *PackageCollection) Search(_ Dependency, _ bool, _ bool) (searchResults []*Package) {

Callers

nothing calls this directly

Calls 5

ByKeyMethod · 0.95
KeysByPrefixMethod · 0.65
MatchesMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected