splitImportPath splits "file.md#Section" into ("file.md", "Section"). If no "#" is present, returns (includePath, "").
(includePath string)
| 406 | // splitImportPath splits "file.md#Section" into ("file.md", "Section"). |
| 407 | // If no "#" is present, returns (includePath, ""). |
| 408 | func 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. |
| 416 | func writeImportDirective(w *strings.Builder, workflowSpec string, isOptional bool) { |
no outgoing calls
no test coverage detected