I have two structs
type Service struct {
Label string `json:"label" gorm:"type:varchar(50)"`
Code string `json:"code" gorm:"type:varchar(50)"`
my.Active1
}
And in other package
package my
type Active1 struct {
IsActive uint8 `json:"is_active" gorm:"type:tinyint(1) unsigned;not null;default:1;index"`
}
While instantiating struct ,I can easily do something like
s := entity.Service{
Label: payload.Label,
Code: payload.Code,
my.Active1: // how to initialize this field ??
}
I am not getting any way to initialize the referenced field ,how to do so any idea ?