Skip to content

Commit 6ae9a78

Browse files
fix spellings for new
1 parent 2ce15d5 commit 6ae9a78

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ STuple(
429429
```go
430430
func TestDefaultHugoConfigRoundTripMultiCheck(t *testing.T) {
431431

432-
SchemeJsonStr := `
432+
SchemaJsonStr := `
433433
{
434434
"type": "tuple",
435435
"variableLength": true,
@@ -523,22 +523,22 @@ func TestDefaultHugoConfigRoundTripMultiCheck(t *testing.T) {
523523
}
524524
}`
525525

526-
var SchemeJson SchemeJSON
527-
require.NoError(t, json.Unmarshal([]byte(SchemeJsonStr), &SchemeJson), "failed to unmarshal config")
526+
var SchemaJson SchemaJSON
527+
require.NoError(t, json.Unmarshal([]byte(SchemaJsonStr), &SchemaJson), "failed to unmarshal config")
528528

529-
schain := scheme.SChain(scheme.BuildScheme(SchemeJson))
529+
schain := schema.SChain(schema.BuildSchema(&SchemaJson))
530530

531531
// Decode into generic map
532532
var decoded map[string]any
533533
require.NoError(t, json.Unmarshal([]byte(configJSON), &decoded), "failed to unmarshal config")
534534

535-
// Encode using your scheme
536-
encoded, err := scheme.EncodeValue(decoded, schain)
537-
require.NoError(t, err, "scheme encode failed")
535+
// Encode using your schema
536+
encoded, err := schema.EncodeValue(decoded, schain)
537+
require.NoError(t, err, "schema encode failed")
538538

539-
// Decode back using your scheme
540-
roundTrip, err := scheme.DecodeBuffer(encoded, schain)
541-
require.NoError(t, err, "scheme decode failed")
539+
// Decode back using your schema
540+
roundTrip, err := schema.DecodeBuffer(encoded, schain)
541+
require.NoError(t, err, "schema decode failed")
542542

543543
// Marshal both original and round-trip to canonical JSON
544544
origJSON, err := json.Marshal(decoded)

0 commit comments

Comments
 (0)