From eef49516ef1a850c23887c3de65ba4795db0283e Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Thu, 10 Jul 2014 23:31:53 +0400 Subject: [PATCH] Fix bugs after style fixes. --- cmd/snapshot_list.go | 4 ++-- deb/list.go | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/snapshot_list.go b/cmd/snapshot_list.go index d28cea10..1ca2758d 100644 --- a/cmd/snapshot_list.go +++ b/cmd/snapshot_list.go @@ -26,7 +26,7 @@ func parseSortMethod(sortMethod string) (int, error) { return SortName, nil } - return -1, fmt.Errorf("sorting method \"%s\" unknown", sortMethod_string) + return -1, fmt.Errorf("sorting method \"%s\" unknown", sortMethod) } func (s snapshotListToSort) Swap(i, j int) { @@ -59,7 +59,7 @@ func aptlySnapshotList(cmd *commander.Command, args []string) error { snapshotsToSort := &snapshotListToSort{} snapshotsToSort.list = make([]*deb.Snapshot, context.CollectionFactory().SnapshotCollection().Len()) - snapshotsToSort.sortMethod, err = ParseSortMethod(sortMethodString) + snapshotsToSort.sortMethod, err = parseSortMethod(sortMethodString) if err != nil { return err } diff --git a/deb/list.go b/deb/list.go index 1c5058f2..07d0fad8 100644 --- a/deb/list.go +++ b/deb/list.go @@ -333,7 +333,11 @@ func (l *PackageList) PrepareIndex() { l.indexed = true } -// Search searches package index for specified package +// Query searches package index using parsed query +//func (l *PackageList) Query(, allMatches bool) (searchResults []*Package) { +//} + +// Search searches package index for specified package(s) func (l *PackageList) Search(dep Dependency, allMatches bool) (searchResults []*Package) { if !l.indexed { panic("list not indexed, can't search")