mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-11-24 05:26:02 +03:00
17 lines
183 B
Go
17 lines
183 B
Go
|
package factory
|
||
|
|
||
|
import "log"
|
||
|
|
||
|
func sayHi() {
|
||
|
log.Print("Hi~")
|
||
|
}
|
||
|
|
||
|
func sayHello() {
|
||
|
log.Print("Hello~")
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
speakFuncs["hi"] = sayHi
|
||
|
speakFuncs["hello"] = sayHello
|
||
|
}
|