From 904c57efa90b7a7efedb007c28d113161c57e857 Mon Sep 17 00:00:00 2001 From: M09Ic Date: Sun, 21 May 2023 14:45:37 +0800 Subject: [PATCH] move Result struct to type.go --- internal/db/db.go | 6 ------ internal/db/type.go | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/db/db.go b/internal/db/db.go index 6f02359..cf0bd10 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -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 diff --git a/internal/db/type.go b/internal/db/type.go index 5db927b..e19f56d 100644 --- a/internal/db/type.go +++ b/internal/db/type.go @@ -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 +}