mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
added more tests and added another panic check to node builder.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user