stored line numbers in struct

This commit is contained in:
bjt-user 2024-04-30 10:59:47 +02:00
parent abd4c60339
commit c1c08ca71a

View File

@ -70,9 +70,9 @@ func main() {
file_lines := strings.Split(file_content, "\n")
for _, value := range file_lines {
for index, value := range file_lines {
if is_heading(value) {
headings = append(headings, heading{value, 0, 0})
headings = append(headings, heading{value, 0, (index + 1)})
}
}