(fullPath string, content []byte)
| 99 | } |
| 100 | |
| 101 | func extractFrontmatterForTopologicalSort(fullPath string, content []byte) (map[string]any, error) { |
| 102 | var ( |
| 103 | result *FrontmatterResult |
| 104 | err error |
| 105 | ) |
| 106 | if strings.HasPrefix(fullPath, BuiltinPathPrefix) { |
| 107 | result, err = ExtractFrontmatterFromBuiltinFile(fullPath, content) |
| 108 | } else { |
| 109 | result, err = ExtractFrontmatterFromContent(string(content)) |
| 110 | } |
| 111 | if err != nil { |
| 112 | return nil, err |
| 113 | } |
| 114 | return result.Frontmatter, nil |
| 115 | } |
| 116 | |
| 117 | func calculateInDegree(imports []string, dependencies map[string][]string, allImportsSet map[string]struct { |
| 118 | }) map[string]int { |
no test coverage detected