removed struct member parent

This commit is contained in:
bjt-user 2024-05-06 01:34:25 +02:00
parent c92fde4988
commit 7a998e6cbf

View File

@ -11,10 +11,9 @@ import (
)
type heading struct {
text string
level int
line int
parent *heading
text string
level int
line int
}
func is_heading(line string) bool {
@ -47,7 +46,7 @@ func parse_file(file_name string) []heading {
for index, value := range file_lines {
if is_heading(value) {
headings = append(
headings, heading{value, get_heading_level(value), (index + 1), nil})
headings, heading{value, get_heading_level(value), (index + 1)})
}
}
return headings