Gather the pick key's load and render sides in pick.go, and name each thing for what it is

This commit is contained in:
2026-10-09 10:54:35 +02:00
committed by Lillem4n
parent ee4b40bd25
commit 0002efb9d4
20 changed files with 202 additions and 227 deletions
+3 -3
View File
@@ -74,7 +74,7 @@ func compileTable(m map[string]any, dir []string, name string, readRows func(fil
if t.rows, err = rows.Parse(t, name, categoryPath(dir, name), o.rows, data, o.options); err != nil {
return nil, err
}
if err := t.checkCells(); err != nil {
if err := t.compileCells(); err != nil {
return nil, fmt.Errorf("%s: %w", o.rows, err)
}
if err := t.compileRowFormat(o.format); err != nil {
@@ -118,8 +118,8 @@ func readTableOptions(m map[string]any) (tableOptionValues, error) {
return o, nil
}
// checkCells compiles every cell carrying a token.
func (t *table) checkCells() error {
// compileCells compiles every cell carrying a token into cellTemplates.
func (t *table) compileCells() error {
header := t.rows.Header()
for row := 0; row < t.rows.Len(); row++ {
for col := range header {