Added ToString for SectionTable

This commit is contained in:
2022-09-17 23:29:11 -04:00
parent 955f8b4719
commit 744e8de794
3 changed files with 26 additions and 0 deletions

View File

@@ -15,6 +15,15 @@ func (where locator) ToString () (output string) {
// and all sections that it requires from other modules.
type SectionTable map[locator] Section
// ToString returns the data stored in the table as a string.
func (table SectionTable) ToString (indent int) (output string) {
for _, section := range table {
output += section.ToString(indent)
}
return
}
// SectionKind differentiates Section interfaces.
type SectionKind int