mirror of
https://github.com/SourceFellows/gobuch.git
synced 2024-10-22 22:05:35 +00:00
22 lines
216 B
Go
22 lines
216 B
Go
|
package main
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
type Dog interface {
|
||
|
Bark()
|
||
|
}
|
||
|
|
||
|
type Dackel struct {
|
||
|
name string
|
||
|
}
|
||
|
|
||
|
func (d Dackel) Bark() {
|
||
|
fmt.Printf("Wuff %v\n", d.name)
|
||
|
}
|
||
|
|
||
|
func main() {
|
||
|
var d Dog
|
||
|
d = Dackel{"Heino"}
|
||
|
d.Bark()
|
||
|
}
|