added more tests and added another panic check to node builder.

This commit is contained in:
quobix
2024-05-17 16:31:31 -04:00
parent e4b7bf52d2
commit a12d27baf1
2 changed files with 122 additions and 1 deletions

View File

@@ -193,7 +193,9 @@ func (n *NodeBuilder) add(key string, i int) {
sort.Slice(lines, func(i, j int) bool {
return lines[i] < lines[j]
})
nodeEntry.Line = lines[0]
if len(lines) > 0 {
nodeEntry.Line = lines[0]
}
case reflect.Struct:
y := value.Interface()
nodeEntry.Line = 9999 + i