parser

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MarkdownSection

type MarkdownSection struct {
	Title      string
	Content    string
	CodeBlocks []string
}

MarkdownSection represents a parsed markdown section

type ParsedDocs

type ParsedDocs struct {
	Sections map[string]interface{} `json:"sections"`
}

ParsedDocs represents the complete parsed documentation

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser converts markdown documentation to structured JSON

func New

func New(logger *logrus.Logger) *Parser

New creates a new parser instance

func (*Parser) GenerateJSON

func (p *Parser) GenerateJSON(packageDir string, cfg *config.DocgenConfig) error

GenerateJSON reads markdown files and generates structured JSON

type Section

type Section struct {
	Title       string       `json:"title"`
	Content     string       `json:"content"`
	Subsections []Subsection `json:"subsections,omitempty"`
	CodeBlocks  []string     `json:"code_blocks,omitempty"`
}

Section represents a parsed documentation section

type Subsection

type Subsection struct {
	Title      string   `json:"title"`
	Content    string   `json:"content"`
	CodeBlocks []string `json:"code_blocks,omitempty"`
}

Subsection represents a subsection within a documentation section

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL