mirror of
https://github.com/nxtrace/nali
synced 2024-11-22 18:34:22 +00:00
go fmt
This commit is contained in:
parent
8cb2d500f1
commit
40274f64a4
@ -3,11 +3,9 @@ package entity
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/zu1k/nali/pkg/dbif"
|
||||
|
||||
"github.com/zu1k/nali/internal/db"
|
||||
|
||||
"github.com/zu1k/nali/internal/re"
|
||||
"github.com/zu1k/nali/pkg/dbif"
|
||||
)
|
||||
|
||||
// ParseLine parse a line into entities
|
||||
|
@ -1,29 +0,0 @@
|
||||
package dbif
|
||||
|
||||
func init() {
|
||||
|
||||
}
|
||||
|
||||
type langMap map[string][]DB
|
||||
type dataTypeMap map[QueryType][]DB
|
||||
|
||||
var (
|
||||
lang2DB = make(langMap)
|
||||
type2DB = make(dataTypeMap)
|
||||
)
|
||||
|
||||
func RegistLang(lang string, db DB) {
|
||||
originDBs, found := lang2DB[lang]
|
||||
if !found {
|
||||
originDBs = make([]DB, 0, 1)
|
||||
}
|
||||
lang2DB[lang] = append(originDBs, db)
|
||||
}
|
||||
|
||||
func RegistType(typ QueryType, db DB) {
|
||||
originDBs, found := type2DB[typ]
|
||||
if !found {
|
||||
originDBs = make([]DB, 0, 1)
|
||||
}
|
||||
type2DB[typ] = append(originDBs, db)
|
||||
}
|
Loading…
Reference in New Issue
Block a user