2020-07-03 00:05:59 +00:00
|
|
|
package hello
|
|
|
|
|
|
|
|
type HelloSayer interface {
|
|
|
|
SayHello() string
|
|
|
|
}
|
|
|
|
|
|
|
|
type helloSayerImpl struct{}
|
|
|
|
|
2020-07-03 02:11:06 +00:00
|
|
|
func (helloSayerImpl) SayHello() string { return "hello" }
|
2020-07-03 00:05:59 +00:00
|
|
|
|
|
|
|
func NewHelloSayer() HelloSayer {
|
|
|
|
return helloSayerImpl{}
|
|
|
|
}
|