Kaynağa Gözat

chore(download): rename PKGBUILD function to match package

jguer 3 yıl önce
ebeveyn
işleme
b8641256ab
2 değiştirilmiş dosya ile 3 ekleme ve 5 silme
  1. 1 1
      get.go
  2. 2 4
      pkg/download/unified.go

+ 1 - 1
get.go

@@ -16,7 +16,7 @@ import (
 
 // yay -Gp
 func printPkgbuilds(dbExecutor db.Executor, httpClient *http.Client, targets []string) error {
-	pkgbuilds, err := download.GetPkgbuilds(dbExecutor, httpClient, targets, config.Runtime.Mode)
+	pkgbuilds, err := download.PKGBUILDs(dbExecutor, httpClient, targets, config.Runtime.Mode)
 	if err != nil {
 		text.Errorln(err)
 	}

+ 2 - 4
pkg/download/unified.go

@@ -71,7 +71,7 @@ func getURLName(pkg db.IPackage) string {
 	return name
 }
 
-func GetPkgbuilds(dbExecutor DBSearcher, httpClient *http.Client, targets []string, mode settings.TargetMode) (map[string][]byte, error) {
+func PKGBUILDs(dbExecutor DBSearcher, httpClient *http.Client, targets []string, mode settings.TargetMode) (map[string][]byte, error) {
 	pkgbuilds := make(map[string][]byte, len(targets))
 
 	var (
@@ -149,9 +149,7 @@ func PKGBUILDRepos(dbExecutor DBSearcher,
 		wg.Add(1)
 
 		go func(target, dbName, pkgName string, aur bool) {
-			var (
-				err error
-			)
+			var err error
 
 			if aur {
 				err = AURPKGBUILDRepo(cmdRunner, cmdBuilder, aurURL, pkgName, dest, force)