Listing of packages in snapshot.

This commit is contained in:
Andrey Smirnov
2013-12-23 14:29:41 +04:00
parent fe61ae1b41
commit 4d950b79ab
5 changed files with 39 additions and 0 deletions
+9
View File
@@ -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)
}
}