Skip to content

Commit c855704

Browse files
authored
Merge pull request #4 from philhuan/feat/philhuan_support_param_render
feat: support param render
2 parents 80d0919 + f1ffb1c commit c855704

File tree

12 files changed

+857
-31
lines changed

12 files changed

+857
-31
lines changed

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ module github.com/shiningrush/fastflow
33
go 1.14
44

55
require (
6+
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6
7+
github.com/golang/mock v1.6.0
68
github.com/mitchellh/mapstructure v1.1.2
79
github.com/prometheus/client_golang v1.8.0
810
github.com/shiningrush/goevent v0.1.0

go.sum

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a
100100
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
101101
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
102102
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
103+
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I=
103104
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
104105
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
106+
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
107+
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
105108
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
106109
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
107110
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -333,6 +336,7 @@ github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6
333336
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
334337
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=
335338
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
339+
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
336340
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
337341
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
338342
go.mongodb.org/mongo-driver v1.5.4 h1:NPIBF/lxEcKNfWwoCJRX8+dMVwecWf9q3qUJkuh75oM=
@@ -365,6 +369,7 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl
365369
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
366370
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
367371
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
372+
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
368373
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
369374
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
370375
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -382,8 +387,9 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL
382387
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
383388
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
384389
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
385-
golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
386390
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
391+
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
392+
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
387393
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
388394
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
389395
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -392,8 +398,9 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
392398
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
393399
golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
394400
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
395-
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
396401
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
402+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
403+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
397404
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
398405
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
399406
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -416,10 +423,15 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w
416423
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
417424
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
418425
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
419-
golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211 h1:9UQO31fZ+0aKQOFldThf7BKPMJTiBfWycGh/u3UoO88=
420426
golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
427+
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
428+
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
429+
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
430+
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
431+
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
421432
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
422433
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
434+
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
423435
golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
424436
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
425437
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -440,11 +452,14 @@ golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgw
440452
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
441453
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
442454
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
455+
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
443456
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
457+
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
444458
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
445459
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
446-
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
447460
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
461+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
462+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
448463
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
449464
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
450465
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=

pkg/entity/dag.go

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ package entity
33
import (
44
"encoding/json"
55
"fmt"
6-
"github.com/shiningrush/fastflow/pkg/log"
7-
"github.com/shiningrush/fastflow/pkg/utils"
86
"strings"
97
"sync"
8+
9+
"github.com/shiningrush/fastflow/pkg/log"
10+
"github.com/shiningrush/fastflow/pkg/utils"
11+
"github.com/shiningrush/fastflow/pkg/utils/value"
1012
)
1113

1214
// NewDag new a dag
@@ -268,22 +270,14 @@ func (dagIns *DagInstance) CanModifyStatus() bool {
268270

269271
// Render variables
270272
func (vars DagInstanceVars) Render(p map[string]interface{}) (map[string]interface{}, error) {
271-
for varKey, varValue := range vars {
272-
for k := range p {
273-
if s, ok := p[k].(string); ok {
274-
p[k] = strings.ReplaceAll(s, fmt.Sprintf("{{%s}}", varKey), varValue.Value)
275-
}
276-
if m, ok := p[k].(map[string]interface{}); ok {
277-
renderMap, err := vars.Render(m)
278-
if err != nil {
279-
return nil, err
280-
}
281-
p[k] = renderMap
282-
}
273+
err := value.MapValue(p).WalkString(func(walkContext *value.WalkContext, s string) error {
274+
for varKey, varValue := range vars {
275+
s = strings.ReplaceAll(s, fmt.Sprintf("{{%s}}", varKey), varValue.Value)
283276
}
284-
}
285-
286-
return p, nil
277+
walkContext.Setter(s)
278+
return nil
279+
})
280+
return p, err
287281
}
288282

289283
// Command

pkg/entity/dag_test.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,13 @@ func testHook(t *testing.T, dagIns *DagInstance, wantRet string, wantStatus DagI
140140

141141
func TestDagInstanceVars_Render(t *testing.T) {
142142
tests := []struct {
143+
name string
143144
giveVar DagInstanceVars
144145
giveParams map[string]interface{}
145146
wantParams map[string]interface{}
146147
}{
147148
{
149+
name: "simple val",
148150
giveVar: DagInstanceVars{
149151
"test1": {
150152
Value: "test1-v",
@@ -169,6 +171,7 @@ func TestDagInstanceVars_Render(t *testing.T) {
169171
},
170172
},
171173
{
174+
name: "json string",
172175
giveVar: DagInstanceVars{
173176
"jsonString": {
174177
Value: `{"cluster_id":"tenc-6h27vfr2"}`,
@@ -184,9 +187,11 @@ func TestDagInstanceVars_Render(t *testing.T) {
184187
}
185188

186189
for _, tc := range tests {
187-
ret, err := tc.giveVar.Render(tc.giveParams)
188-
assert.NoError(t, err)
189-
assert.Equal(t, tc.wantParams, ret)
190+
t.Run(tc.name, func(t *testing.T) {
191+
ret, err := tc.giveVar.Render(tc.giveParams)
192+
assert.NoError(t, err)
193+
assert.Equal(t, tc.wantParams, ret)
194+
})
190195
}
191196
}
192197

pkg/entity/task.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,9 @@ type TaskInstance struct {
146146
PreChecks PreChecks `json:"preChecks,omitempty" bson:"preChecks,omitempty"`
147147

148148
// used to save changes
149-
Patch func(*TaskInstance) error `json:"-" bson:"-"`
150-
Context run.ExecuteContext `json:"-" bson:"-"`
149+
Patch func(*TaskInstance) error `json:"-" bson:"-"`
150+
Context run.ExecuteContext `json:"-" bson:"-"`
151+
RelatedDagInstance *DagInstance `json:"-" bson:"-"`
151152

152153
// it used to buffer traces, and persist when status changed
153154
bufTraces []TraceInfo
@@ -195,9 +196,10 @@ func (t *TaskInstance) GetStatus() TaskInstanceStatus {
195196
}
196197

197198
// InitialDep
198-
func (t *TaskInstance) InitialDep(ctx run.ExecuteContext, patch func(*TaskInstance) error) {
199+
func (t *TaskInstance) InitialDep(ctx run.ExecuteContext, patch func(*TaskInstance) error, dagIns *DagInstance) {
199200
t.Patch = patch
200201
t.Context = ctx
202+
t.RelatedDagInstance = dagIns
201203
}
202204

203205
// SetStatus will persist task instance

pkg/mod/executor.go

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ package mod
33
import (
44
"context"
55
"fmt"
6+
"strings"
67
"sync"
78
"time"
89

10+
"github.com/shiningrush/fastflow/pkg/render"
11+
"github.com/shiningrush/fastflow/pkg/utils/value"
12+
913
"github.com/mitchellh/mapstructure"
1014
"github.com/shiningrush/fastflow/pkg/entity"
1115
"github.com/shiningrush/fastflow/pkg/entity/run"
@@ -29,6 +33,8 @@ type DefExecutor struct {
2933
timeout time.Duration
3034
initQueue chan *initPayload
3135

36+
paramRender *render.TplRender
37+
3238
closeCh chan struct{}
3339
lock sync.RWMutex
3440
}
@@ -47,6 +53,7 @@ func NewDefExecutor(timeout time.Duration, workers int) *DefExecutor {
4753
timeout: timeout,
4854
initQueue: make(chan *initPayload),
4955
closeCh: make(chan struct{}, 1),
56+
paramRender: render.NewTplRender(),
5057
}
5158
}
5259

@@ -105,7 +112,7 @@ func (e *DefExecutor) initWorkerTask(dagIns *entity.DagInstance, taskIns *entity
105112
run.NewDefExecuteContext(c, dagIns.ShareData, taskIns.Trace, dagIns.VarsGetter(), dagIns.VarsIterator()),
106113
func(instance *entity.TaskInstance) error {
107114
return GetStore().PatchTaskIns(instance)
108-
})
115+
}, dagIns)
109116
e.cancelMap.Store(taskIns.ID, cancel)
110117
e.workerQueue <- taskIns
111118
}
@@ -196,7 +203,56 @@ func (e *DefExecutor) runAction(taskIns *entity.TaskInstance) error {
196203
}
197204

198205
func (e *DefExecutor) getFromTaskInstance(taskIns *entity.TaskInstance, params interface{}) error {
199-
return mapstructure.WeakDecode(taskIns.Params, params)
206+
err := e.renderParams(taskIns)
207+
if err != nil {
208+
return fmt.Errorf("renderParams failed: %w", err)
209+
}
210+
211+
return weakDecode(taskIns.Params, params)
212+
}
213+
214+
func weakDecode(input interface{}, output interface{}) error {
215+
config := &mapstructure.DecoderConfig{
216+
WeaklyTypedInput: true,
217+
Metadata: nil,
218+
Result: output,
219+
TagName: "json", // Find target field using json tag
220+
}
221+
222+
decoder, err := mapstructure.NewDecoder(config)
223+
if err != nil {
224+
return err
225+
}
226+
227+
return decoder.Decode(input)
228+
}
229+
230+
func (e *DefExecutor) renderParams(taskIns *entity.TaskInstance) error {
231+
data := map[string]interface{}{}
232+
233+
dagInstance := taskIns.RelatedDagInstance
234+
if dagInstance != nil {
235+
data["vars"] = dagInstance.Vars
236+
if dagInstance.ShareData != nil {
237+
data["shareData"] = dagInstance.ShareData.Dict
238+
}
239+
}
240+
241+
err := value.MapValue(taskIns.Params).WalkString(func(walkContext *value.WalkContext, v string) error {
242+
if strings.Contains(v, "{{") && strings.Contains(v, "}}") {
243+
result, err := e.paramRender.Render(v, data)
244+
if err != nil {
245+
return err
246+
}
247+
walkContext.Setter(result)
248+
}
249+
return nil
250+
})
251+
if err != nil {
252+
log.Errorf("WalkString failed: %v", err)
253+
return err
254+
}
255+
return nil
200256
}
201257

202258
// Close

0 commit comments

Comments
 (0)