Is there a way to make an interface also include methods defined by another interface in Go?
For instance:
type BasicDatabase interface { CreateTable(string) error DeleteTable(string) error } type SpecificDatabase interface { CreateUserRecord(User) error }
I would like to indicate that the SpecificDatabase interface contains the BasicDatabase interface. Just as Go allows you to execute structure structures.
Thus, my methods can take a type that implements SpecificDatabase , but still calls CreateTable() on it.
source share