content: support filters on local.store#Walk()

While Walk() has been taking filter strings, it was not using the parameter.
This change actually makes the filtering work.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato
2020-11-06 16:26:21 -08:00
parent 78ac7bac84
commit e74ace9ad8
4 changed files with 66 additions and 23 deletions

View File

@@ -181,7 +181,7 @@ func (cs *contentStore) Walk(ctx context.Context, fn content.WalkFunc, fs ...str
if err := readInfo(&info, bkt.Bucket(k)); err != nil {
return err
}
if filter.Match(adaptContentInfo(info)) {
if filter.Match(content.AdaptInfo(info)) {
infos = append(infos, info)
}
return nil