File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -310,7 +310,8 @@ func (i *importer) queryImports(filename string) fileImports {
310310 }
311311 }
312312 }
313- if strings .HasPrefix (q .Ret .Type (), name ) {
313+ retType := strings .TrimPrefix (q .Ret .Type (), "[]" )
314+ if strings .HasPrefix (retType , name ) {
314315 return true
315316 }
316317 }
@@ -323,7 +324,8 @@ func (i *importer) queryImports(filename string) fileImports {
323324 }
324325 }
325326 }
326- if strings .HasPrefix (q .Arg .Type (), name ) {
327+ argType := strings .TrimPrefix (q .Arg .Type (), "[]" )
328+ if strings .HasPrefix (argType , name ) {
327329 return true
328330 }
329331 }
@@ -418,7 +420,8 @@ func (i *importer) batchImports(filename string) fileImports {
418420 }
419421 }
420422 }
421- if strings .HasPrefix (q .Ret .Type (), name ) {
423+ retType := strings .TrimPrefix (q .Ret .Type (), "[]" )
424+ if strings .HasPrefix (retType , name ) {
422425 return true
423426 }
424427 }
@@ -431,7 +434,8 @@ func (i *importer) batchImports(filename string) fileImports {
431434 }
432435 }
433436 }
434- if strings .HasPrefix (q .Arg .Type (), name ) {
437+ argType := strings .TrimPrefix (q .Arg .Type (), "[]" )
438+ if strings .HasPrefix (argType , name ) {
435439 return true
436440 }
437441 }
You can’t perform that action at this time.
0 commit comments