mirror of
https://github.com/kopia/kopia.git
synced 2026-04-04 06:22:59 -04:00
repo: refactored read/write methods of repo.Repository (#749)
Reader methods go to repo.Reader and write methods go to repo.Writer Switched usage to new interfaces based on linter errors.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
diffCommandCommand = diffCommand.Flag("diff-command", "Displays differences between two repository objects (files or directories)").Default(defaultDiffCommand()).Envar("KOPIA_DIFF").String()
|
||||
)
|
||||
|
||||
func runDiffCommand(ctx context.Context, rep repo.Repository) error {
|
||||
func runDiffCommand(ctx context.Context, rep repo.Reader) error {
|
||||
ent1, err := snapshotfs.FilesystemEntryFromIDWithPath(ctx, rep, *diffFirstObjectPath, false)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error getting filesystem entry for %v", *diffFirstObjectPath)
|
||||
@@ -67,5 +67,5 @@ func defaultDiffCommand() string {
|
||||
}
|
||||
|
||||
func init() {
|
||||
diffCommand.Action(repositoryAction(runDiffCommand))
|
||||
diffCommand.Action(repositoryReaderAction(runDiffCommand))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user