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:
+1
-1
@@ -263,7 +263,7 @@ func TestABrokenManifestFailsNewNamingEveryMistake(t *testing.T) {
|
||||
`{`: {datafiles.ManifestFile},
|
||||
`{"index": {}} {}`: {"after top-level value"},
|
||||
`{"indx": {}, "INDEX": {}}`: {`unknown key "INDEX"`, `unknown key "indx"`},
|
||||
`{"index": []}`: {"index must be an object, not an array"},
|
||||
`{"index": []}`: {"index must be an object, not a list"},
|
||||
`{"index": {"a..b": 5}}`: {`"a..b"`, "must be an object, not a number"},
|
||||
`{"index": {"a": {"Paths": [""]}}}`: {`unknown key "Paths"`, "paths is missing"},
|
||||
`{"index": {"a": {}, "b": {}}}`: {`"a": paths is missing`, `"b": paths is missing`},
|
||||
|
||||
Reference in New Issue
Block a user