From 827674f1d004bbb7546147e7b4cd5fee31003742 Mon Sep 17 00:00:00 2001 From: Esteban Trabajos Date: Sun, 14 Apr 2024 14:13:31 -0600 Subject: [PATCH] Fix formatting --- pkg/query/query_builder.go | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pkg/query/query_builder.go b/pkg/query/query_builder.go index 466334e8..a7d2c3cb 100644 --- a/pkg/query/query_builder.go +++ b/pkg/query/query_builder.go @@ -1,8 +1,7 @@ package query import ( - - "context" + "context" "sort" "strconv" "strings" @@ -19,7 +18,6 @@ import ( "github.com/Jguer/yay/v12/pkg/intrange" "github.com/Jguer/yay/v12/pkg/settings/parser" "github.com/Jguer/yay/v12/pkg/text" - ) const sourceAUR = "aur" @@ -80,17 +78,16 @@ func NewSourceQueryBuilder( type abstractResult struct { source string - id int - base string - baseid int + id int + base string + baseid int name string description string votes int provides []string - submitted int - modified int + submitted int + modified int popularity float64 - } type abstractResults struct { @@ -137,7 +134,7 @@ func (a *abstractResults) Less(i, j int) bool { } } case "votes": - cmpResult = pkgA.votes > pkgB.votes + cmpResult = pkgA.votes > pkgB.votes case "submitted": cmpResult = pkgA.submitted > pkgB.submitted case "modified": @@ -200,7 +197,7 @@ func (s *SourceQueryBuilder) Execute(ctx context.Context, dbExecutor db.Executor source: dbName, id: aurResults[i].ID, base: aurResults[i].PackageBase, - baseid: aurResults[i].PackageBaseID, + baseid: aurResults[i].PackageBaseID, name: aurResults[i].Name, description: aurResults[i].Description, provides: aurResults[i].Provides,