removed struct member parent
This commit is contained in:
parent
c92fde4988
commit
7a998e6cbf
9
main.go
9
main.go
@ -11,10 +11,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type heading struct {
|
type heading struct {
|
||||||
text string
|
text string
|
||||||
level int
|
level int
|
||||||
line int
|
line int
|
||||||
parent *heading
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func is_heading(line string) bool {
|
func is_heading(line string) bool {
|
||||||
@ -47,7 +46,7 @@ func parse_file(file_name string) []heading {
|
|||||||
for index, value := range file_lines {
|
for index, value := range file_lines {
|
||||||
if is_heading(value) {
|
if is_heading(value) {
|
||||||
headings = append(
|
headings = append(
|
||||||
headings, heading{value, get_heading_level(value), (index + 1), nil})
|
headings, heading{value, get_heading_level(value), (index + 1)})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return headings
|
return headings
|
||||||
|
Reference in New Issue
Block a user