Add comments and fix common lint issues

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-10-20 11:46:19 -04:00
parent 9bd1dc78cb
commit 5fd0415985
15 changed files with 60 additions and 38 deletions

View File

@@ -566,7 +566,7 @@ func (cs *contentStore) garbageCollect(ctx context.Context) error {
return err
}
if err := cs.Store.Walk(ctx, func(info content.Info) error {
return cs.Store.Walk(ctx, func(info content.Info) error {
if _, ok := seen[info.Digest.String()]; !ok {
if err := cs.Store.Delete(ctx, info.Digest); err != nil {
return err
@@ -574,9 +574,5 @@ func (cs *contentStore) garbageCollect(ctx context.Context) error {
log.G(ctx).WithField("digest", info.Digest).Debug("removed content")
}
return nil
}); err != nil {
return err
}
return nil
})
}