add: interfaces assertion and composition (wip)

This commit is contained in:
Inanc Gumus
2019-08-20 19:03:57 +03:00
parent aa7fada2aa
commit 6b95995c81
14 changed files with 397 additions and 4 deletions

View File

@@ -22,10 +22,6 @@ func main() {
// printer(tetris).discount(.8)
store.print()
// type printer interface {
// print()
// }
// p can store a value of any type that has a `print()` method
var p printer
p = puzzle{title: "sidewinder", price: 10}