diff --git a/cmd/khepri/cmd_list.go b/cmd/khepri/cmd_list.go index 0b8e9fe4b..fc14f5e16 100644 --- a/cmd/khepri/cmd_list.go +++ b/cmd/khepri/cmd_list.go @@ -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 diff --git a/repository.go b/repository.go index 88c068a68..f78f97933 100644 --- a/repository.go +++ b/repository.go @@ -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), "*") diff --git a/repository_test.go b/repository_test.go index 1b5f955a1..dd47eea3f 100644 --- a/repository_test.go +++ b/repository_test.go @@ -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)