mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-09 06:04:12 +00:00
ForEach method for repositories.
This commit is contained in:
Vendored
+7
@@ -267,3 +267,10 @@ func (collection *RemoteRepoCollection) ByName(name string) (*RemoteRepo, error)
|
||||
}
|
||||
return nil, fmt.Errorf("mirror with name %s not found", name)
|
||||
}
|
||||
|
||||
// ForEach runs method for each repository
|
||||
func (collection *RemoteRepoCollection) ForEach(handler func(*RemoteRepo)) {
|
||||
for _, r := range collection.list {
|
||||
handler(r)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user