@@ -238,7 +238,7 @@ func initNodeCallbacks(ctx context.Context, key string, info *nodeInfo, meta *ex
238
238
if len (opts [i ].handler ) != 0 {
239
239
if len (opts [i ].paths ) != 0 {
240
240
for _ , k := range opts [i ].paths {
241
- if len (k .path ) == 1 && k .path [0 ] == key {
241
+ if len (k .Path ()) == 1 && k .Path () [0 ] == key {
242
242
cbs = append (cbs , opts [i ].handler ... )
243
243
break
244
244
}
@@ -314,18 +314,18 @@ func extractOption(nodes map[string]*chanCall, opts ...Option) (map[string][]any
314
314
}
315
315
}
316
316
for _ , path := range opt .paths {
317
- if len (path .path ) == 0 {
317
+ if len (path .Path () ) == 0 {
318
318
return nil , fmt .Errorf ("call option has designated an empty path" )
319
319
}
320
320
321
321
var curNode * chanCall
322
322
var ok bool
323
- if curNode , ok = nodes [path .path [0 ]]; ! ok {
323
+ if curNode , ok = nodes [path .Path () [0 ]]; ! ok {
324
324
return nil , fmt .Errorf ("option has designated an unknown node: %s" , path )
325
325
}
326
- curNodeKey := path .path [0 ]
326
+ curNodeKey := path .Path () [0 ]
327
327
328
- if len (path .path ) == 1 {
328
+ if len (path .Path () ) == 1 {
329
329
if len (opt .options ) == 0 {
330
330
// sub graph common callbacks has been added to ctx in initNodeCallback and won't be passed to subgraph only pass options
331
331
// node callback also won't be passed
@@ -350,7 +350,7 @@ func extractOption(nodes map[string]*chanCall, opts ...Option) (map[string][]any
350
350
}
351
351
// designate to sub graph's nodes
352
352
nOpt := opt .deepCopy ()
353
- nOpt .paths = []* NodePath {NewNodePath (path .path [1 :]... )}
353
+ nOpt .paths = []* NodePath {NewNodePath (path .Path () [1 :]... )}
354
354
optMap [curNodeKey ] = append (optMap [curNodeKey ], nOpt )
355
355
}
356
356
}
0 commit comments