瀏覽代碼

Move Base code to dep.go

morganamilo 6 年之前
父節點
當前提交
75d01f32b4
共有 2 個文件被更改,包括 14 次插入14 次删除
  1. 14 0
      dep.go
  2. 0 14
      depOrder.go

+ 14 - 0
dep.go

@@ -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

+ 0 - 14
depOrder.go

@@ -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