Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
Document is a generic data structure that represents a document.
func NewDocument ¶ added in v0.2.36
NewDocument creates a new document.
Parameters:
- sentences: The sentences to add to the document.
Returns:
- *Document: A pointer to the newly created document.
func (*Document) AddLine ¶ added in v0.2.36
AddLine adds sentences to the document separated by a space. The line is split by the newline character.
Parameters:
- line: The line to add.
Returns:
- *Document: A pointer to the document. This allows for chaining.
Example:
- AddLine("Hello,", "world!")
- AddLine("This is a sentence.")
func (*Document) FString ¶ added in v0.2.36
FString returns the formatted string representation of the document.
Parameters:
- indentLevel: The level of indentation.
Returns:
- []string: The formatted string representation of the document.
Click to show internal directories.
Click to hide internal directories.