getBases now wants a slice instead of a map

The one place this function is used, the caller converts its data to
a map just to getBases will accept it. Instead just allow it to take the
slice to begin with.
This commit is contained in:
morganamilo
2018-08-11 05:46:20 +01:00
parent 40776fa184
commit b1ee03a7d8
2 changed files with 2 additions and 8 deletions

8
vcs.go
View File

@@ -10,7 +10,6 @@ import (
"time"
gosrc "github.com/Morganamilo/go-srcinfo"
rpc "github.com/mikkeloscar/aur"
)
// Info contains the last commit sha of a repo
@@ -26,7 +25,6 @@ type shaInfo struct {
func createDevelDB() error {
var mux sync.Mutex
var wg sync.WaitGroup
infoMap := make(map[string]*rpc.Pkg)
_, _, _, remoteNames, err := filterPackages()
if err != nil {
@@ -38,11 +36,7 @@ func createDevelDB() error {
return err
}
for _, pkg := range info {
infoMap[pkg.Name] = pkg
}
bases := getBases(infoMap)
bases := getBases(info)
toSkip := pkgbuildsToSkip(bases, sliceToStringSet(remoteNames))
downloadPkgbuilds(bases, toSkip)
srcinfos, _ := parseSrcinfoFiles(bases, false)