Skip to content

Commit 1442d65

Browse files
committed
fix(test): fix incorrect field access in defaults test
- Change sample.Struct.Embedded.Int to sample.Struct.Int - This corrects the test to check the embedded struct field directly
1 parent 3ea528e commit 1442d65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

defaults_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ func TestInit(t *testing.T) {
496496
if sample.StructPtr == nil || sample.StructPtr.WithDefault != "foo" {
497497
t.Errorf("it should set default on inner field in struct pointer")
498498
}
499-
if sample.Struct.Embedded.Int != 1 {
499+
if sample.Struct.Int != 1 {
500500
t.Errorf("it should set default on an Embedded struct")
501501
}
502502
})

0 commit comments

Comments
 (0)