From 976ca0905a6c9c665bd9175f03e19a50c4a936d1 Mon Sep 17 00:00:00 2001 From: Dave Shanley Date: Wed, 9 Aug 2023 07:35:26 -0400 Subject: [PATCH] Added line sorting back in for `GetAllSchemas` Signed-off-by: Dave Shanley --- index/spec_index.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index/spec_index.go b/index/spec_index.go index 83f98ce..6d78f37 100644 --- a/index/spec_index.go +++ b/index/spec_index.go @@ -14,6 +14,7 @@ package index import ( "fmt" + "sort" "strings" "sync" @@ -245,9 +246,9 @@ func (index *SpecIndex) GetAllSchemas() []*Reference { combined[i] = refSchemas[x] i++ } - //sort.Slice(combined, func(i, j int) bool { - // return combined[i].Node.Line < combined[j].Node.Line - //}) + sort.Slice(combined, func(i, j int) bool { + return combined[i].Node.Line < combined[j].Node.Line + }) return combined }