Rename 'Repo' -> 'Repository'

This commit is contained in:
Alexander Neumann
2015-05-09 23:59:58 +02:00
parent 232c472836
commit 95536e8a21
15 changed files with 73 additions and 73 deletions

View File

@@ -59,7 +59,7 @@ func parseTime(str string) (time.Time, error) {
return time.Time{}, fmt.Errorf("unable to parse time: %q", str)
}
func (c CmdFind) findInTree(repo *repository.Repo, id backend.ID, path string) ([]findResult, error) {
func (c CmdFind) findInTree(repo *repository.Repository, id backend.ID, path string) ([]findResult, error) {
debug.Log("restic.find", "checking tree %v\n", id)
tree, err := restic.LoadTree(repo, id)
if err != nil {
@@ -105,7 +105,7 @@ func (c CmdFind) findInTree(repo *repository.Repo, id backend.ID, path string) (
return results, nil
}
func (c CmdFind) findInSnapshot(repo *repository.Repo, name string) error {
func (c CmdFind) findInSnapshot(repo *repository.Repository, name string) error {
debug.Log("restic.find", "searching in snapshot %s\n for entries within [%s %s]", name, c.oldest, c.newest)
id, err := backend.ParseID(name)

View File

@@ -34,7 +34,7 @@ func init() {
}
}
func fsckFile(opts CmdFsck, repo *repository.Repo, IDs []backend.ID) (uint64, error) {
func fsckFile(opts CmdFsck, repo *repository.Repository, IDs []backend.ID) (uint64, error) {
debug.Log("restic.fsckFile", "checking file %v", IDs)
var bytes uint64
@@ -77,7 +77,7 @@ func fsckFile(opts CmdFsck, repo *repository.Repo, IDs []backend.ID) (uint64, er
return bytes, nil
}
func fsckTree(opts CmdFsck, repo *repository.Repo, id backend.ID) error {
func fsckTree(opts CmdFsck, repo *repository.Repository, id backend.ID) error {
debug.Log("restic.fsckTree", "checking tree %v", id.Str())
tree, err := restic.LoadTree(repo, id)
@@ -157,7 +157,7 @@ func fsckTree(opts CmdFsck, repo *repository.Repo, id backend.ID) error {
return firstErr
}
func fsckSnapshot(opts CmdFsck, repo *repository.Repo, id backend.ID) error {
func fsckSnapshot(opts CmdFsck, repo *repository.Repository, id backend.ID) error {
debug.Log("restic.fsck", "checking snapshot %v\n", id)
sn, err := restic.LoadSnapshot(repo, id)

View File

@@ -21,7 +21,7 @@ func init() {
}
}
func listKeys(s *repository.Repo) error {
func listKeys(s *repository.Repository) error {
tab := NewTable()
tab.Header = fmt.Sprintf(" %-10s %-10s %-10s %s", "ID", "User", "Host", "Created")
tab.RowFormat = "%s%-10s %-10s %-10s %s"
@@ -56,7 +56,7 @@ func listKeys(s *repository.Repo) error {
return nil
}
func addKey(s *repository.Repo) error {
func addKey(s *repository.Repository) error {
pw := readPassword("RESTIC_NEWPASSWORD", "enter password for new key: ")
pw2 := readPassword("RESTIC_NEWPASSWORD", "enter password again: ")
@@ -74,7 +74,7 @@ func addKey(s *repository.Repo) error {
return nil
}
func deleteKey(repo *repository.Repo, name string) error {
func deleteKey(repo *repository.Repository, name string) error {
if name == repo.KeyName() {
return errors.New("refusing to remove key currently used to access repository")
}
@@ -88,7 +88,7 @@ func deleteKey(repo *repository.Repo, name string) error {
return nil
}
func changePassword(s *repository.Repo) error {
func changePassword(s *repository.Repository) error {
pw := readPassword("RESTIC_NEWPASSWORD", "enter password for new key: ")
pw2 := readPassword("RESTIC_NEWPASSWORD", "enter password again: ")

View File

@@ -38,7 +38,7 @@ func printNode(prefix string, n *restic.Node) string {
}
}
func printTree(prefix string, repo *repository.Repo, id backend.ID) error {
func printTree(prefix string, repo *repository.Repository, id backend.ID) error {
tree, err := restic.LoadTree(repo, id)
if err != nil {
return err

View File

@@ -133,7 +133,7 @@ func create(u string) (backend.Backend, error) {
return sftp.Create(url.Path[1:], "ssh", args...)
}
func OpenRepo() (*repository.Repo, error) {
func OpenRepo() (*repository.Repository, error) {
if opts.Repo == "" {
return nil, errors.New("Please specify repository location (-r)")
}