1
0
mirror of https://github.com/garraflavatra/go-fmp.git synced 2025-07-17 03:34:05 +00:00

Row parsing

This commit is contained in:
2025-06-22 18:43:06 +02:00
parent 7359962d98
commit d22b209ca5
5 changed files with 53 additions and 15 deletions

View File

@ -3,6 +3,7 @@ package fmp
import (
"fmt"
"os"
"slices"
)
const debugging = false
@ -80,7 +81,15 @@ func (c *FmpChunk) String() string {
func (dict *FmpDict) string(parentPath string) string {
s := ""
for k, v := range *dict {
keys := make([]uint64, 0, len(*dict))
for k := range *dict {
keys = append(keys, k)
}
slices.Sort(keys)
for _, k := range keys {
v := (*dict)[k]
s += fmt.Sprintf("%v%v: %v\n", parentPath, k, string(v.Value))
if v.Children != nil {