@@ -835,8 +835,9 @@ func TestNullableAttr_Time(t *testing.T) {
835835 RFC3339Time : nil ,
836836 },
837837 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 {
840841 return fmt .Errorf ("got %v, want %v" , got , want )
841842 }
842843 return nil
@@ -849,8 +850,9 @@ func TestNullableAttr_Time(t *testing.T) {
849850 RFC3339Time : NewNullNullableAttr [time.Time ](),
850851 },
851852 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 {
854856 return fmt .Errorf ("got %v, want %v" , got , want )
855857 }
856858 return nil
@@ -930,8 +932,9 @@ func TestNullableAttr_Bool(t *testing.T) {
930932 Bool : nil ,
931933 },
932934 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 {
935938 return fmt .Errorf ("got %v, want %v" , got , want )
936939 }
937940 return nil
@@ -944,8 +947,9 @@ func TestNullableAttr_Bool(t *testing.T) {
944947 Bool : NewNullNullableAttr [bool ](),
945948 },
946949 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 {
949953 return fmt .Errorf ("got %v, want %v" , got , want )
950954 }
951955 return nil
0 commit comments