mirror of
https://github.com/octoleo/restic.git
synced 2024-11-21 20:35:12 +00:00
Rename ListIDs -> List
This commit is contained in:
parent
e525655dcb
commit
022f514b09
@ -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 New Issue
Block a user