Answer architecture round 3: New loads only sources without an index and what they read, an entry drops reads, ErrLoad sits beside New, the manifest decoder moves to manifest.go and names each mistake once as jsonvalue.Kind words it
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/larvit/fejkdata/internal/drawstate"
|
||||
"github.com/larvit/fejkdata/internal/grammar"
|
||||
"github.com/larvit/fejkdata/internal/invariant"
|
||||
"github.com/larvit/fejkdata/internal/jsonvalue"
|
||||
"github.com/larvit/fejkdata/internal/rows"
|
||||
)
|
||||
|
||||
@@ -102,7 +103,7 @@ func readTableOptions(m map[string]any) (tableOptionValues, error) {
|
||||
}
|
||||
s, isString := v.(string)
|
||||
if !isString {
|
||||
return o, fmt.Errorf("%s must be a string, not %s", k, jsonKind(v))
|
||||
return o, fmt.Errorf("%s must be a string, not %s", k, jsonvalue.Kind(v))
|
||||
}
|
||||
if k != "format" && s == "" {
|
||||
return o, fmt.Errorf("%s names a column, so it cannot be empty; drop it", k)
|
||||
|
||||
Reference in New Issue
Block a user