firstLevelDirKey returns the first path segment of a repo-relative path, or " " for files directly in the repo root.
(it model.ScanItem)
| 108 | // firstLevelDirKey returns the first path segment of a repo-relative path, |
| 109 | // or "<root>" for files directly in the repo root. |
| 110 | func firstLevelDirKey(it model.ScanItem) string { |
| 111 | idx := strings.IndexByte(it.Path, '/') |
| 112 | if idx < 0 { |
| 113 | return "<root>" |
| 114 | } |
| 115 | return it.Path[:idx] |
| 116 | } |
nothing calls this directly
no outgoing calls
no test coverage detected