How do you embed two types of the same name in a struct? For instance:
type datastore {
*sql.Store
*file.Store
}
Results in duplicate field Store
. I know this makes sense, since you wouldn't be able to refer to the embedded field ds.Store
but how do you accomplish this anyway?
To clarify, I want to implement an interface with datastore
. For that both structs are needed as their methods complement each other to create the interface. What alterantives do I have?