File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -309,7 +309,8 @@ func (i *importer) queryImports(filename string) fileImports {
309309 }
310310 }
311311 }
312- if strings .HasPrefix (q .Ret .Type (), name ) {
312+ retType := strings .TrimPrefix (q .Ret .Type (), "[]" )
313+ if strings .HasPrefix (retType , name ) {
313314 return true
314315 }
315316 }
@@ -322,7 +323,8 @@ func (i *importer) queryImports(filename string) fileImports {
322323 }
323324 }
324325 }
325- if strings .HasPrefix (q .Arg .Type (), name ) {
326+ argType := strings .TrimPrefix (q .Arg .Type (), "[]" )
327+ if strings .HasPrefix (argType , name ) {
326328 return true
327329 }
328330 }
@@ -414,7 +416,8 @@ func (i *importer) batchImports(filename string) fileImports {
414416 }
415417 }
416418 }
417- if strings .HasPrefix (q .Ret .Type (), name ) {
419+ retType := strings .TrimPrefix (q .Ret .Type (), "[]" )
420+ if strings .HasPrefix (retType , name ) {
418421 return true
419422 }
420423 }
@@ -427,7 +430,8 @@ func (i *importer) batchImports(filename string) fileImports {
427430 }
428431 }
429432 }
430- if strings .HasPrefix (q .Arg .Type (), name ) {
433+ argType := strings .TrimPrefix (q .Arg .Type (), "[]" )
434+ if strings .HasPrefix (argType , name ) {
431435 return true
432436 }
433437 }
You can’t perform that action at this time.
0 commit comments