Documentation
¶
Index ¶
- type Mdgo
- func (m *Mdgo) Extract(outputFile string) error
- func (m *Mdgo) InputByte(content []byte) *Mdgo
- func (m *Mdgo) InputEmbed(path string, readerFile func(name string) ([]byte, error)) *Mdgo
- func (m *Mdgo) InputPath(pathFile string, readerFile func(name string) ([]byte, error)) *Mdgo
- func (m *Mdgo) SetLogger(logger func(...any)) *Mdgo
- func (m *Mdgo) UpdateSection(sectionID, content string, afterLine ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mdgo ¶
type Mdgo struct {
// contains filtered or unexported fields
}
func New ¶
New creates a new Mdgo instance with the root directory. Destination (output directory) and input must be set via methods.
func (*Mdgo) Extract ¶
Extract extracts code blocks from the configured input and writes to outputFile The output file extension determines which code type to extract (.go, .js, .css)
func (*Mdgo) InputEmbed ¶
InputEmbed sets the input as any ReaderFile implementation and a relative path inside it
func (*Mdgo) UpdateSection ¶ added in v0.0.9
UpdateSection updates or creates a section in the input file based on identifier. sectionID: The identifier for the section (e.g., "BADGES"). content: The new content to insert. afterLine: Optional. Implementation tries to insert after this line number if section doesn't exist.