ParseMarkdownPRD reads and parses a PRD markdown file from the given path.
(path string)
| 27 | |
| 28 | // ParseMarkdownPRD reads and parses a PRD markdown file from the given path. |
| 29 | func ParseMarkdownPRD(path string) (*PRD, error) { |
| 30 | data, err := os.ReadFile(path) |
| 31 | if err != nil { |
| 32 | return nil, fmt.Errorf("failed to read PRD file: %w", err) |
| 33 | } |
| 34 | |
| 35 | return ParseMarkdownPRDFromString(string(data)) |
| 36 | } |
| 37 | |
| 38 | // ParseMarkdownPRDFromString parses a PRD from a markdown string. |
| 39 | func ParseMarkdownPRDFromString(content string) (*PRD, error) { |