I have confirmed this with v2.2.0.
If I put the following structure to DynamoDB, a panic occurs.
type ServerResponse struct {
EmbeddedID int
}
type TestAddition struct {
ServerResponse
}
type TestItem struct {
ID int `dynamo:"id,hash" json:"id"`
Name string `dynamo:"name,range" json:"name"`
Addition TestAddition `dynamo:"addition,omitempty"`
}
tbl.Put(TestItem{ID: 1, Name: "test"}).Run(ctx)
This is because field.isZero == nil is set on line 257 of reflect.go.
Is it possible to include an embed structure in Put?
I have confirmed this with v2.2.0. If I put the following structure to DynamoDB, a panic occurs.
This is because field.isZero == nil is set on line 257 of reflect.go. Is it possible to include an embed structure in Put?