mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2025-02-16 13:43:13 +03:00
Create main.go
This commit is contained in:
parent
8ac63fef97
commit
cca554b4ec
17
behavioral/interpreter/main.go
Normal file
17
behavioral/interpreter/main.go
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @author : Jagepard <jagepard@yandex.ru>
|
||||
* @license https://mit-license.org/ MIT
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
func main() {
|
||||
interpreter := Interpreter{registry: make(map[int]Album)}
|
||||
|
||||
interpreter.addAlbumToRegistry(Album{name: "Untouchables", author: "Korn"})
|
||||
interpreter.addAlbumToRegistry(Album{name: "Adrenaline", author: "Deftones"})
|
||||
interpreter.interpret("album 2")
|
||||
interpreter.interpret("album author 2")
|
||||
interpreter.interpret("album author 1")
|
||||
interpreter.interpret("author 1")
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user