MCPcopy Create free account
hub / github.com/aptly-dev/aptly / loadList

Method loadList

deb/publish.go:1309–1325  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1307}
1308
1309func (collection *PublishedRepoCollection) loadList() {
1310 if collection.list != nil {
1311 return
1312 }
1313
1314 blobs := collection.db.FetchByPrefix([]byte("U"))
1315 collection.list = make([]*PublishedRepo, 0, len(blobs))
1316
1317 for _, blob := range blobs {
1318 r := &PublishedRepo{}
1319 if err := r.Decode(blob); err != nil {
1320 log.Printf("Error decoding published repo: %s\n", err)
1321 } else {
1322 collection.list = append(collection.list, r)
1323 }
1324 }
1325}
1326
1327// Add appends new repo to collection and saves it
1328func (collection *PublishedRepoCollection) Add(repo *PublishedRepo) error {

Callers 9

AddMethod · 0.95
CheckDuplicateMethod · 0.95
ByUUIDMethod · 0.95
BySnapshotMethod · 0.95
ByLocalRepoMethod · 0.95
LenMethod · 0.95
RemoveMethod · 0.95

Calls 3

DecodeMethod · 0.95
FetchByPrefixMethod · 0.65
PrintfMethod · 0.65

Tested by

no test coverage detected