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

Method SourceNames

deb/publish.go:653–673  ·  view source on GitHub ↗

SourceNames returns sorted list of published repo source names

()

Source from the content-addressed store, hash-verified

651
652// SourceNames returns sorted list of published repo source names
653func (p *PublishedRepo) SourceNames() []string {
654 var sources = []string{}
655
656 for _, component := range p.Components() {
657 var source string
658
659 item := p.sourceItems[component]
660 if item.snapshot != nil {
661 source = item.snapshot.Name
662 } else if item.localRepo != nil {
663 source = item.localRepo.Name
664 } else {
665 panic("no snapshot/localRepo")
666 }
667
668 sources = append(sources, fmt.Sprintf("%s:%s", source, component))
669 }
670
671 sort.Strings(sources)
672 return sources
673}
674
675// UpdateLocalRepo inserts/updates local repository source for component
676func (p *PublishedRepo) UpdateLocalRepo(component string, localRepo *LocalRepo) {

Callers 2

countPackagesByReposFunction · 0.45

Calls 2

ComponentsMethod · 0.95
StringsMethod · 0.45

Tested by 1