@@ -835,8 +835,9 @@ func TestNullableAttr_Time(t *testing.T) {
835
835
RFC3339Time : nil ,
836
836
},
837
837
verification : func (root map [string ]interface {}) error {
838
- v := root ["data" ].(map [string ]interface {})["attributes" ].(map [string ]interface {})["rfc3339_time" ]
839
- if got , want := v , (interface {})(nil ); got != want {
838
+ _ , ok := root ["data" ].(map [string ]interface {})["attributes" ].(map [string ]interface {})["rfc3339_time" ]
839
+
840
+ if got , want := ok , false ; got != want {
840
841
return fmt .Errorf ("got %v, want %v" , got , want )
841
842
}
842
843
return nil
@@ -849,8 +850,9 @@ func TestNullableAttr_Time(t *testing.T) {
849
850
RFC3339Time : NewNullNullableAttr [time.Time ](),
850
851
},
851
852
verification : func (root map [string ]interface {}) error {
852
- v := root ["data" ].(map [string ]interface {})["attributes" ].(map [string ]interface {})["rfc3339_time" ]
853
- if got , want := v , (interface {})(nil ); got != want {
853
+ _ , ok := root ["data" ].(map [string ]interface {})["attributes" ].(map [string ]interface {})["rfc3339_time" ]
854
+
855
+ if got , want := ok , true ; got != want {
854
856
return fmt .Errorf ("got %v, want %v" , got , want )
855
857
}
856
858
return nil
@@ -930,8 +932,9 @@ func TestNullableAttr_Bool(t *testing.T) {
930
932
Bool : nil ,
931
933
},
932
934
verification : func (root map [string ]interface {}) error {
933
- v := root ["data" ].(map [string ]interface {})["attributes" ].(map [string ]interface {})["bool" ]
934
- if got , want := v , (interface {})(nil ); got != want {
935
+ _ , ok := root ["data" ].(map [string ]interface {})["attributes" ].(map [string ]interface {})["bool" ]
936
+
937
+ if got , want := ok , false ; got != want {
935
938
return fmt .Errorf ("got %v, want %v" , got , want )
936
939
}
937
940
return nil
@@ -944,8 +947,9 @@ func TestNullableAttr_Bool(t *testing.T) {
944
947
Bool : NewNullNullableAttr [bool ](),
945
948
},
946
949
verification : func (root map [string ]interface {}) error {
947
- v := root ["data" ].(map [string ]interface {})["attributes" ].(map [string ]interface {})["bool" ]
948
- if got , want := v , (interface {})(nil ); got != want {
950
+ _ , ok := root ["data" ].(map [string ]interface {})["attributes" ].(map [string ]interface {})["bool" ]
951
+
952
+ if got , want := ok , true ; got != want {
949
953
return fmt .Errorf ("got %v, want %v" , got , want )
950
954
}
951
955
return nil
0 commit comments