I have a go struct defined as below:
type Record struct {
events.APIGatewayProxyRequest `json:",omitempty"`
events.APIGatewayWebsocketProxyRequest `json:",omitempty"` //nolint:all
events.SQSEvent `json:",omitempty"`
}
I wonder how I can initiate this struct. I tried:
Record{events.APIGatewayProxyRequest: {}}
but it gives me an error: invalid field name events.APIGatewayProxyRequest in struct literal. It seems the name including package name can't be used as key name in the struct. What is the right way to initiate it?