iface: improved example
This commit is contained in:
13
iface/guitarist.go
Normal file
13
iface/guitarist.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
type Guitarist interface {
|
||||
Strum(chord Chord)
|
||||
}
|
||||
|
||||
type Bocchi struct {
|
||||
Guitar string
|
||||
}
|
||||
|
||||
func (b *Bocchi) Strum(chord string) {}
|
||||
|
||||
var _ Guitarist = (*Bocchi)(nil)
|
Reference in New Issue
Block a user