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

Function handleNoIncludeFastPath

pkg/parser/include_expander.go:48–60  ·  view source on GitHub ↗
(content string, extractTools bool)

Source from the content-addressed store, hash-verified

46}
47
48func handleNoIncludeFastPath(content string, extractTools bool) (string, bool) {
49 if hasIncludeDirectives(content) {
50 return "", false
51 }
52 includeExpanderLog.Print("Fast path: no include directives found")
53 if extractTools {
54 return "{}", true
55 }
56 if !strings.HasSuffix(content, "\n") {
57 return content + "\n", true
58 }
59 return content, true
60}
61
62func expandIncludesIteratively(content, baseDir string, extractTools bool) (string, map[string]struct {
63}, error) {

Callers 1

Calls 2

hasIncludeDirectivesFunction · 0.85
PrintMethod · 0.80

Tested by

no test coverage detected