Move the folder walk and the reading of a data tree's JSON and TSV files into internal/datafiles

This commit is contained in:
2026-10-05 15:32:39 +02:00
committed by Lillem4n
parent 691f304096
commit 818a9b56c2
7 changed files with 218 additions and 169 deletions
+2 -2
View File
@@ -85,12 +85,12 @@ func isTableOption(name string) bool {
// token arm.
const inSelector = `[]{}"|`
func compileTable(m map[string]any, segment string, files *categoryFiles) (*table, error) {
func compileTable(m map[string]any, segment string, readRows func(file string) (string, error)) (*table, error) {
o, err := readTableOptions(m)
if err != nil {
return nil, err
}
data, err := files.readRows(o.rows)
data, err := readRows(o.rows)
if err != nil {
return nil, err
}