mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Listing of packages in snapshot.
This commit is contained in:
Vendored
+9
@@ -103,3 +103,12 @@ func (l *PackageRefList) Decode(input []byte) error {
|
||||
decoder := codec.NewDecoderBytes(input, &codec.MsgpackHandle{})
|
||||
return decoder.Decode(l)
|
||||
}
|
||||
|
||||
// ForEach calls handler for each package ref in list
|
||||
//
|
||||
// TODO: Error handling
|
||||
func (l *PackageRefList) ForEach(handler func([]byte)) {
|
||||
for _, p := range l.Refs {
|
||||
handler(p)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user