// this is not a test, but a way to get code coverage, // (in vscode, just run the test with "go.coverOnSingleTest": true) func TestAll(t *testing.T) { … } // check that the parsed file includes all the information // from the json file. This test will fail if the spec // introduces new fields. (one can test this test by // commenting out the version field in Model.) func TestParseContents(t *testing.T) { … } // flatten(nil) = "nil" // flatten(v string) = fmt.Sprintf("%q", v) // flatten(v float64)= fmt.Sprintf("%g", v) // flatten(v bool) = fmt.Sprintf("%v", v) // flatten(v []any) = []string{"[0]"flatten(v[0]), "[1]"flatten(v[1]), ...} // flatten(v map[string]any) = {"key1": flatten(v["key1"]), "key2": flatten(v["key2"]), ...} func flatten(x any) []string { … }