(std map[string]struct{}, pkg map[ImportSpec]struct{})
| 283 | } |
| 284 | |
| 285 | func sortedImports(std map[string]struct{}, pkg map[ImportSpec]struct{}) fileImports { |
| 286 | pkgs := make([]ImportSpec, 0, len(pkg)) |
| 287 | for spec := range pkg { |
| 288 | pkgs = append(pkgs, spec) |
| 289 | } |
| 290 | stds := make([]ImportSpec, 0, len(std)) |
| 291 | for path := range std { |
| 292 | stds = append(stds, ImportSpec{Path: path}) |
| 293 | } |
| 294 | sort.Slice(stds, func(i, j int) bool { return stds[i].Path < stds[j].Path }) |
| 295 | sort.Slice(pkgs, func(i, j int) bool { return pkgs[i].Path < pkgs[j].Path }) |
| 296 | return fileImports{stds, pkgs} |
| 297 | } |
| 298 | |
| 299 | func (i *importer) queryImports(filename string) fileImports { |
| 300 | var gq []Query |
no outgoing calls
no test coverage detected