Rename ListIDs -> List

This commit is contained in:
Alexander Neumann 2014-08-04 22:15:04 +02:00
parent e525655dcb
commit 022f514b09
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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), "*")

View File

@ -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)