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:
2026-10-10 11:07:16 +02:00
committed by Lillem4n
parent 2cb124b8a7
commit 55d503317d
16 changed files with 294 additions and 352 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import (
"github.com/larvit/fejkdata/internal/datatype"
"github.com/larvit/fejkdata/internal/grammar"
"github.com/larvit/fejkdata/internal/invariant"
"github.com/larvit/fejkdata/internal/jsonvalue"
)
// DataType is what a record column holds, which decides how a record writes its value. It
@@ -29,7 +30,7 @@ func datatypeOf(m map[string]any, pos position) (*DataType, error) {
}
name, ok := v.(string)
if !ok {
return nil, fmt.Errorf("datatype must be a string, not %s", jsonKind(v))
return nil, fmt.Errorf("datatype must be a string, not %s", jsonvalue.Kind(v))
}
for d := DataTypeString; d < datatype.Count; d++ {
if name != d.String() {