mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-30 04:20:53 +00:00
Fix bugs after style fixes.
This commit is contained in:
@@ -26,7 +26,7 @@ func parseSortMethod(sortMethod string) (int, error) {
|
|||||||
return SortName, nil
|
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) {
|
func (s snapshotListToSort) Swap(i, j int) {
|
||||||
@@ -59,7 +59,7 @@ func aptlySnapshotList(cmd *commander.Command, args []string) error {
|
|||||||
|
|
||||||
snapshotsToSort := &snapshotListToSort{}
|
snapshotsToSort := &snapshotListToSort{}
|
||||||
snapshotsToSort.list = make([]*deb.Snapshot, context.CollectionFactory().SnapshotCollection().Len())
|
snapshotsToSort.list = make([]*deb.Snapshot, context.CollectionFactory().SnapshotCollection().Len())
|
||||||
snapshotsToSort.sortMethod, err = ParseSortMethod(sortMethodString)
|
snapshotsToSort.sortMethod, err = parseSortMethod(sortMethodString)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -333,7 +333,11 @@ func (l *PackageList) PrepareIndex() {
|
|||||||
l.indexed = true
|
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) {
|
func (l *PackageList) Search(dep Dependency, allMatches bool) (searchResults []*Package) {
|
||||||
if !l.indexed {
|
if !l.indexed {
|
||||||
panic("list not indexed, can't search")
|
panic("list not indexed, can't search")
|
||||||
|
|||||||
Reference in New Issue
Block a user