1
0
mirror of https://github.com/garraflavatra/go-fmp.git synced 2025-06-28 04:25:11 +00:00

Parse table columns

This commit is contained in:
2025-06-15 21:09:58 +02:00
parent f7fef208f8
commit cc10a1e7b4
5 changed files with 159 additions and 53 deletions

View File

@ -9,7 +9,7 @@ type FmpDictEntry struct {
Children *FmpDict
}
func (dict *FmpDict) GetEntry(path []uint64) *FmpDictEntry {
func (dict *FmpDict) GetEntry(path ...uint64) *FmpDictEntry {
for i, key := range path {
_, ok := (*dict)[key]
if !ok {
@ -28,8 +28,8 @@ func (dict *FmpDict) GetEntry(path []uint64) *FmpDictEntry {
return nil
}
func (dict *FmpDict) GetValue(path []uint64) []byte {
ent := dict.GetEntry(path)
func (dict *FmpDict) GetValue(path ...uint64) []byte {
ent := dict.GetEntry(path...)
if ent != nil {
return ent.Value
}