Debug index output is now sorted
This commit is contained in:
parent
9cd9c286c2
commit
84af467feb
|
@ -10,7 +10,7 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Version = "0.41.0"
|
var Version = "0.41.1"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(versionCmd)
|
rootCmd.AddCommand(versionCmd)
|
||||||
|
|
|
@ -653,7 +653,13 @@ func serveIndexHandler(args []string, index *Index) http.HandlerFunc {
|
||||||
|
|
||||||
startTime := time.Now()
|
startTime := time.Now()
|
||||||
|
|
||||||
response, err := json.MarshalIndent(index.Index(), "", " ")
|
indexDump := index.Index()
|
||||||
|
|
||||||
|
sort.SliceStable(indexDump, func(p, q int) bool {
|
||||||
|
return indexDump[p] < indexDump[q]
|
||||||
|
})
|
||||||
|
|
||||||
|
response, err := json.MarshalIndent(indexDump, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue