mirror of
https://github.com/kopia/kopia.git
synced 2026-01-03 12:07:55 -05:00
* tools: upgraded linter to 1.40.1 * lint: fixed nolintlint vionlations * lint: disabled tagliatele linter * lint: fixed remaining warnings
20 lines
485 B
Go
20 lines
485 B
Go
package cli
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/kopia/kopia/repo"
|
|
)
|
|
|
|
type commandCacheSync struct{}
|
|
|
|
func (c *commandCacheSync) setup(svc appServices, parent commandParent) {
|
|
cmd := parent.Command("sync", "Synchronizes the metadata cache with blobs in storage")
|
|
cmd.Action(svc.directRepositoryWriteAction(c.run))
|
|
}
|
|
|
|
func (c *commandCacheSync) run(ctx context.Context, rep repo.DirectRepositoryWriter) error {
|
|
// nolint:wrapcheck
|
|
return rep.ContentManager().SyncMetadataCache(ctx)
|
|
}
|