mirror of
https://github.com/zu1k/nali.git
synced 2025-01-22 13:19:02 +08:00
move Result struct to type.go
This commit is contained in:
parent
a0e6398db8
commit
904c57efa9
@ -6,18 +6,12 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/zu1k/nali/pkg/cdn"
|
||||
"github.com/zu1k/nali/pkg/common"
|
||||
"github.com/zu1k/nali/pkg/dbif"
|
||||
"github.com/zu1k/nali/pkg/geoip"
|
||||
"github.com/zu1k/nali/pkg/qqwry"
|
||||
"github.com/zu1k/nali/pkg/zxipv6wry"
|
||||
)
|
||||
|
||||
type Result struct {
|
||||
Source string
|
||||
common.Result
|
||||
}
|
||||
|
||||
func GetDB(typ dbif.QueryType) (db dbif.DB) {
|
||||
if db, found := dbTypeCache[typ]; found {
|
||||
return db
|
||||
|
@ -1,6 +1,7 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"github.com/zu1k/nali/pkg/common"
|
||||
"log"
|
||||
|
||||
"github.com/zu1k/nali/pkg/cdn"
|
||||
@ -139,3 +140,8 @@ func getDbByName(name string) (db *DB) {
|
||||
log.Fatalf("DB with name %s not found!\n", name)
|
||||
return
|
||||
}
|
||||
|
||||
type Result struct {
|
||||
Source string
|
||||
common.Result
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user