mirror of
https://github.com/zu1k/nali.git
synced 2025-01-22 13:19:02 +08:00
Fix the bug of json nested error
This commit is contained in:
parent
3819ae6808
commit
97cde2aa94
@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
type Result struct {
|
||||
Source string `json:"source"`
|
||||
Source string
|
||||
common.Result
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ type Entity struct {
|
||||
|
||||
Text string `json:"ip"`
|
||||
InfoText string `json:"text"`
|
||||
Source string `json:"source"`
|
||||
Info interface{} `json:"info"`
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,8 @@ func ParseLine(line string) Entities {
|
||||
res := db.Find(dbif.QueryType(e.Type), e.Text)
|
||||
if res != nil {
|
||||
e.InfoText = res.String()
|
||||
e.Info = res
|
||||
e.Info = res.Result
|
||||
e.Source = res.Source
|
||||
es = append(es, e)
|
||||
idx = e.Loc[1]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user