HubFiles returns all files that are imported by 3+ other files
()
| 349 | |
| 350 | // HubFiles returns all files that are imported by 3+ other files |
| 351 | func (fg *FileGraph) HubFiles() []string { |
| 352 | var hubs []string |
| 353 | for path, importers := range fg.Importers { |
| 354 | if len(importers) >= 3 { |
| 355 | hubs = append(hubs, path) |
| 356 | } |
| 357 | } |
| 358 | return hubs |
| 359 | } |
| 360 | |
| 361 | // ConnectedFiles returns all files connected to the given file (imports + importers) |
| 362 | func (fg *FileGraph) ConnectedFiles(path string) []string { |
no outgoing calls