Chore: Cleanup (#1800)
This commit is contained in:
9 files changed
+35
-43
No files matched your search
@@ -19,7 +19,7 @@ type Pkg = aur.Pkg
|
||||
// of packages exceeds the number set in config.RequestSplitN.
|
||||
// If the number does exceed config.RequestSplitN multiple aur requests will be
|
||||
// performed concurrently.
|
||||
func AURInfo(ctx context.Context, aurClient *aur.Client, names []string, warnings *AURWarnings, splitN int) ([]*Pkg, error) {
|
||||
func AURInfo(ctx context.Context, aurClient aur.ClientInterface, names []string, warnings *AURWarnings, splitN int) ([]*Pkg, error) {
|
||||
info := make([]*Pkg, 0, len(names))
|
||||
seen := make(map[string]int)
|
||||
|
||||
@@ -84,7 +84,7 @@ func AURInfo(ctx context.Context, aurClient *aur.Client, names []string, warning
|
||||
return info, nil
|
||||
}
|
||||
|
||||
func AURInfoPrint(ctx context.Context, aurClient *aur.Client, names []string, splitN int) ([]*Pkg, error) {
|
||||
func AURInfoPrint(ctx context.Context, aurClient aur.ClientInterface, names []string, splitN int) ([]*Pkg, error) {
|
||||
text.OperationInfoln(gotext.Get("Querying AUR..."))
|
||||
|
||||
warnings := &AURWarnings{}
|
||||
|
||||
@@ -25,7 +25,7 @@ const sourceAUR = "aur"
|
||||
|
||||
type Builder interface {
|
||||
Len() int
|
||||
Execute(ctx context.Context, dbExecutor db.Executor, aurClient *aur.Client, pkgS []string)
|
||||
Execute(ctx context.Context, dbExecutor db.Executor, aurClient aur.ClientInterface, pkgS []string)
|
||||
Results(w io.Writer, dbExecutor db.Executor, verboseSearch SearchVerbosity) error
|
||||
GetTargets(include, exclude intrange.IntRanges, otherExclude stringset.StringSet) ([]string, error)
|
||||
}
|
||||
@@ -122,7 +122,7 @@ func (a *abstractResults) Less(i, j int) bool {
|
||||
return simA > simB
|
||||
}
|
||||
|
||||
func (s *MixedSourceQueryBuilder) Execute(ctx context.Context, dbExecutor db.Executor, aurClient *aur.Client, pkgS []string) {
|
||||
func (s *MixedSourceQueryBuilder) Execute(ctx context.Context, dbExecutor db.Executor, aurClient aur.ClientInterface, pkgS []string) {
|
||||
var aurErr error
|
||||
|
||||
pkgS = RemoveInvalidTargets(pkgS, s.targetMode)
|
||||
|
||||
+2
-2
@@ -54,7 +54,7 @@ func NewSourceQueryBuilder(
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SourceQueryBuilder) Execute(ctx context.Context, dbExecutor db.Executor, aurClient *aur.Client, pkgS []string) {
|
||||
func (s *SourceQueryBuilder) Execute(ctx context.Context, dbExecutor db.Executor, aurClient aur.ClientInterface, pkgS []string) {
|
||||
var aurErr error
|
||||
|
||||
pkgS = RemoveInvalidTargets(pkgS, s.targetMode)
|
||||
@@ -176,7 +176,7 @@ func filterAURResults(pkgS []string, results []aur.Pkg) []aur.Pkg {
|
||||
}
|
||||
|
||||
// queryAUR searches AUR and narrows based on subarguments.
|
||||
func queryAUR(ctx context.Context, aurClient *aur.Client, pkgS []string, searchBy string) ([]aur.Pkg, error) {
|
||||
func queryAUR(ctx context.Context, aurClient aur.ClientInterface, pkgS []string, searchBy string) ([]aur.Pkg, error) {
|
||||
var (
|
||||
err error
|
||||
by = getSearchBy(searchBy)
|
||||
|
||||
Reference in new issue
Block a user