mirror of
https://github.com/restic/restic.git
synced 2024-12-21 23:33:03 +00:00
Rename ListIDs -> List
This commit is contained in:
parent
e525655dcb
commit
022f514b09
3 changed files with 3 additions and 3 deletions
|
@ -15,7 +15,7 @@ func commandList(repo *khepri.Repository, args []string) error {
|
|||
|
||||
tpe := khepri.NewTypeFromString(args[0])
|
||||
|
||||
ids, err := repo.ListIDs(tpe)
|
||||
ids, err := repo.List(tpe)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error: %v\n", err)
|
||||
return nil
|
||||
|
|
|
@ -169,7 +169,7 @@ func (r *Repository) Remove(t Type, id ID) error {
|
|||
type IDs []ID
|
||||
|
||||
// Lists all objects of a given type.
|
||||
func (r *Repository) ListIDs(t Type) (IDs, error) {
|
||||
func (r *Repository) List(t Type) (IDs, error) {
|
||||
// TODO: use os.Open() and d.Readdirnames() instead of Glob()
|
||||
pattern := path.Join(r.dir(t), "*")
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ func TestRepository(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
ids, err := repo.ListIDs(tpe)
|
||||
ids, err := repo.List(tpe)
|
||||
ok(t, err)
|
||||
|
||||
sort.Sort(ids)
|
||||
|
|
Loading…
Reference in a new issue