How do you define struct's field type as struct?
I want to be able to have something like below:
type HelloResp struct {
Response struct `xml:resp`
}
func (hr *HelloResp) SetHelloResp(interf interface{}) {
hr.Response = interf
}
Basically I have a few of other children structs I want to embed as needed under HelloResp.Response
so they are interchangeable by functions.
Is this anyway possible or are there any recommended Go way of doing this?