Skip to content

Commit 1cd004b

Browse files
committed
Improve performance
1 parent e42c52b commit 1cd004b

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/indexer/ti.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
package indexer
22

33
import (
4+
"encoding/json"
45
"fmt"
56
"sort"
67
"strings"
78

89
"github.com/triole/logseal"
910
)
1011

12+
func pprint(i interface{}) {
13+
s, _ := json.MarshalIndent(i, "", " ")
14+
fmt.Println(string(s))
15+
}
16+
1117
func (ind *Indexer) updateParams(params Params, process bool) Params {
1218
src := params.Endpoint.Source
1319
params.Method = params.Endpoint.Method
@@ -77,16 +83,8 @@ func (ind *Indexer) updateTapIndex(params Params) {
7783
ind.DataSources.Params = params
7884
}
7985
}
80-
if len(params.Sources) < 1 {
81-
ind.Lg.Warn(
82-
"process urls list is empty",
83-
logseal.F{"regex": fmt.Sprintf("%+v", params.Endpoint.Process.RegexMatch)},
84-
)
85-
} else {
86-
ti = ind.assembleTapIndex(params)
87-
ti = ind.applyJSONPath(ti, params.Endpoint.Process.JSONPath)
88-
}
8986
}
87+
ti = ind.applyJSONPath(ti, params.Endpoint.Return.JSONPath)
9088
}
9189

9290
sort.Sort(TapIndex(ti))

0 commit comments

Comments
 (0)