From 0ec2f4e6b9b964638321c96799601b4a3ce35f3b Mon Sep 17 00:00:00 2001 From: Aren Patel Date: Tue, 1 Aug 2017 18:03:13 -0700 Subject: [PATCH] Fixed embedded spelling mistakes. --- embeded_structs_test.go | 22 +++++++++++----------- models_test.go | 2 +- request_test.go | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/embeded_structs_test.go b/embeded_structs_test.go index 9399fb6..17381ca 100644 --- a/embeded_structs_test.go +++ b/embeded_structs_test.go @@ -655,7 +655,7 @@ func TestMarshalUnmarshalCompositeStruct(t *testing.T) { } } -func TestMarshal_duplicatePrimaryAnnotationFromEmbededStructs(t *testing.T) { +func TestMarshal_duplicatePrimaryAnnotationFromEmbeddedStructs(t *testing.T) { type Outer struct { ID string `jsonapi:"primary,outer"` Comment @@ -697,7 +697,7 @@ func TestMarshal_duplicatePrimaryAnnotationFromEmbededStructs(t *testing.T) { } } -func TestMarshal_duplicateAttributeAnnotationFromEmbededStructs(t *testing.T) { +func TestMarshal_duplicateAttributeAnnotationFromEmbeddedStructs(t *testing.T) { type Foo struct { Count uint `json:"count" jsonapi:"attr,count"` } @@ -717,7 +717,7 @@ func TestMarshal_duplicateAttributeAnnotationFromEmbededStructs(t *testing.T) { var payloadData map[string]interface{} - // The standard JSON lib will not serialize either embeded struct's fields if + // The standard JSON lib will not serialize either embedded struct's fields if // a duplicate is encountered jsonData, err := json.Marshal(o) if err != nil { @@ -744,7 +744,7 @@ func TestMarshal_duplicateAttributeAnnotationFromEmbededStructs(t *testing.T) { } } -func TestMarshal_duplicateAttributeAnnotationFromEmbededStructsPtrs(t *testing.T) { +func TestMarshal_duplicateAttributeAnnotationFromEmbeddedStructsPtrs(t *testing.T) { type Foo struct { Count uint `json:"count" jsonapi:"attr,count"` } @@ -764,7 +764,7 @@ func TestMarshal_duplicateAttributeAnnotationFromEmbededStructsPtrs(t *testing.T var payloadData map[string]interface{} - // The standard JSON lib will not serialize either embeded struct's fields if + // The standard JSON lib will not serialize either embedded struct's fields if // a duplicate is encountered jsonData, err := json.Marshal(o) if err != nil { @@ -791,7 +791,7 @@ func TestMarshal_duplicateAttributeAnnotationFromEmbededStructsPtrs(t *testing.T } } -func TestMarshal_duplicateAttributeAnnotationFromEmbededStructsMixed(t *testing.T) { +func TestMarshal_duplicateAttributeAnnotationFromEmbeddedStructsMixed(t *testing.T) { type Foo struct { Count uint `json:"count" jsonapi:"attr,count"` } @@ -811,7 +811,7 @@ func TestMarshal_duplicateAttributeAnnotationFromEmbededStructsMixed(t *testing. var payloadData map[string]interface{} - // The standard JSON lib will not serialize either embeded struct's fields if + // The standard JSON lib will not serialize either embedded struct's fields if // a duplicate is encountered jsonData, err := json.Marshal(o) if err != nil { @@ -839,7 +839,7 @@ func TestMarshal_duplicateAttributeAnnotationFromEmbededStructsMixed(t *testing. } } -func TestMarshal_duplicateFieldFromEmbededStructs_serializationNameDiffers(t *testing.T) { +func TestMarshal_duplicateFieldFromEmbeddedStructs_serializationNameDiffers(t *testing.T) { type Foo struct { Count uint `json:"foo-count" jsonapi:"attr,foo-count"` } @@ -909,7 +909,7 @@ func TestMarshal_duplicateFieldFromEmbededStructs_serializationNameDiffers(t *te } } -func TestMarshal_embededStruct_providesDuplicateAttr(t *testing.T) { +func TestMarshal_embeddedStruct_providesDuplicateAttr(t *testing.T) { type Foo struct { Number uint `json:"count" jsonapi:"attr,count"` } @@ -953,7 +953,7 @@ func TestMarshal_embededStruct_providesDuplicateAttr(t *testing.T) { } } -func TestMarshal_embededStructPtr_providesDuplicateAttr(t *testing.T) { +func TestMarshal_embeddedStructPtr_providesDuplicateAttr(t *testing.T) { type Foo struct { Number uint `json:"count" jsonapi:"attr,count"` } @@ -997,4 +997,4 @@ func TestMarshal_embededStructPtr_providesDuplicateAttr(t *testing.T) { } } -// TODO: test permutation of relations with embeded structs +// TODO: test permutation of relations with embedded structs diff --git a/models_test.go b/models_test.go index 1059ad4..925189e 100644 --- a/models_test.go +++ b/models_test.go @@ -156,7 +156,7 @@ func (bc *BadComment) JSONAPILinks() *Links { } } -// Embeded Struct Models +// Embedded Struct Models type Engine struct { NumberOfCylinders uint `jsonapi:"attr,cylinders"` HorsePower uint `jsonapi:"attr,hp"` diff --git a/request_test.go b/request_test.go index ea9a15f..13172c8 100644 --- a/request_test.go +++ b/request_test.go @@ -703,7 +703,7 @@ func TestManyPayload_withLinks(t *testing.T) { } } -func TestEmbededStructs_nonNilStructPtr(t *testing.T) { +func TestEmbeddedStructs_nonNilStructPtr(t *testing.T) { originalVehicle := &Vehicle{ Make: "VW", Model: "R32", @@ -753,7 +753,7 @@ func TestEmbededStructs_nonNilStructPtr(t *testing.T) { } } -func TestEmbededStructs_nilStructPtr(t *testing.T) { +func TestEmbeddedStructs_nilStructPtr(t *testing.T) { originalVehicle := &Vehicle{ Make: "VW", Model: "R32",