@@ -238,7 +238,7 @@ func initNodeCallbacks(ctx context.Context, key string, info *nodeInfo, meta *ex
238238 if len (opts [i ].handler ) != 0 {
239239 if len (opts [i ].paths ) != 0 {
240240 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 {
242242 cbs = append (cbs , opts [i ].handler ... )
243243 break
244244 }
@@ -314,18 +314,18 @@ func extractOption(nodes map[string]*chanCall, opts ...Option) (map[string][]any
314314 }
315315 }
316316 for _ , path := range opt .paths {
317- if len (path .path ) == 0 {
317+ if len (path .Path () ) == 0 {
318318 return nil , fmt .Errorf ("call option has designated an empty path" )
319319 }
320320
321321 var curNode * chanCall
322322 var ok bool
323- if curNode , ok = nodes [path .path [0 ]]; ! ok {
323+ if curNode , ok = nodes [path .Path () [0 ]]; ! ok {
324324 return nil , fmt .Errorf ("option has designated an unknown node: %s" , path )
325325 }
326- curNodeKey := path .path [0 ]
326+ curNodeKey := path .Path () [0 ]
327327
328- if len (path .path ) == 1 {
328+ if len (path .Path () ) == 1 {
329329 if len (opt .options ) == 0 {
330330 // sub graph common callbacks has been added to ctx in initNodeCallback and won't be passed to subgraph only pass options
331331 // node callback also won't be passed
@@ -350,7 +350,7 @@ func extractOption(nodes map[string]*chanCall, opts ...Option) (map[string][]any
350350 }
351351 // designate to sub graph's nodes
352352 nOpt := opt .deepCopy ()
353- nOpt .paths = []* NodePath {NewNodePath (path .path [1 :]... )}
353+ nOpt .paths = []* NodePath {NewNodePath (path .Path () [1 :]... )}
354354 optMap [curNodeKey ] = append (optMap [curNodeKey ], nOpt )
355355 }
356356 }
0 commit comments