Move Base code to dep.go

This commit is contained in:
morganamilo 2018-10-10 22:27:42 +01:00
parent 5109fc6250
commit 75d01f32b4
No known key found for this signature in database
GPG key ID: 6FE9E7996B0B082E
2 changed files with 14 additions and 14 deletions

14
dep.go
View file

@ -40,6 +40,20 @@ func (q providers) Swap(i, j int) {
q.Pkgs[i], q.Pkgs[j] = q.Pkgs[j], q.Pkgs[i]
}
type Base []*rpc.Pkg
func (b Base) Pkgbase() string {
return b[0].PackageBase
}
func (b Base) Version() string {
return b[0].Version
}
func (b Base) URLPath() string {
return b[0].URLPath
}
type target struct {
Db string
Name string

View file

@ -5,20 +5,6 @@ import (
rpc "github.com/mikkeloscar/aur"
)
type Base []*rpc.Pkg
func (b Base) Pkgbase() string {
return b[0].PackageBase
}
func (b Base) Version() string {
return b[0].Version
}
func (b Base) URLPath() string {
return b[0].URLPath
}
type depOrder struct {
Aur []Base
Repo []*alpm.Package