Исходники и презентации
This commit is contained in:
17
lessons/interfaces/interface_composition/main.go
Normal file
17
lessons/interfaces/interface_composition/main.go
Normal file
@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Greater interface {
|
||||
Hello()
|
||||
}
|
||||
|
||||
type Stranger interface {
|
||||
Greater
|
||||
Hello()
|
||||
}
|
||||
|
||||
func main() {
|
||||
var s Stranger
|
||||
fmt.Println(s)
|
||||
}
|
||||
Reference in New Issue
Block a user