2 ms·
Go supports parametric polymorphism by specifying arguments with an interface type. func DoWorkWith(foo Loggable) { ... } type Loggable interface { //
by majewsky 7y ago
Go supports parametric polymorphism by specifying arguments with an interface type.
func DoWorkWith(foo Loggable) { ... }
type Loggable interface {
//for example
LogTo(os.Writer)
}