MCPcopy Create free account
hub / github.com/github/gh-aw / extractFrontmatterForTopologicalSort

Function extractFrontmatterForTopologicalSort

pkg/parser/import_topological.go:101–115  ·  view source on GitHub ↗
(fullPath string, content []byte)

Source from the content-addressed store, hash-verified

99}
100
101func 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
117func calculateInDegree(imports []string, dependencies map[string][]string, allImportsSet map[string]struct {
118}) map[string]int {

Callers 1

resolveNestedImportPathsFunction · 0.85

Tested by

no test coverage detected