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

Function splitImportPath

pkg/cli/imports.go:408–413  ·  view source on GitHub ↗

splitImportPath splits "file.md#Section" into ("file.md", "Section"). If no "#" is present, returns (includePath, "").

(includePath string)

Source from the content-addressed store, hash-verified

406// splitImportPath splits "file.md#Section" into ("file.md", "Section").
407// If no "#" is present, returns (includePath, "").
408func splitImportPath(includePath string) (filePath, sectionName string) {
409 if file, section, ok := strings.Cut(includePath, "#"); ok {
410 return file, section
411 }
412 return includePath, ""
413}
414
415// writeImportDirective writes an {{#import}} or {{#import?}} directive for workflowSpec.
416func writeImportDirective(w *strings.Builder, workflowSpec string, isOptional bool) {

Callers 2

processIncludesInContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected