mirror of
https://github.com/Estom/notes.git
synced 2026-04-15 02:39:56 +08:00
go知识重新整理
This commit is contained in:
27
Go/DesignPattern/bridging/bridging_test.go
Normal file
27
Go/DesignPattern/bridging/bridging_test.go
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @Author:zhoutao
|
||||
* @Date:2020/12/12 上午9:32
|
||||
* @Desc:
|
||||
*/
|
||||
|
||||
package bridging
|
||||
|
||||
func ExampleCommonSMS() {
|
||||
m := NewCommonMessage(ViaSMS())
|
||||
m.SendMessage("sending by sms:have a drink", "boo")
|
||||
}
|
||||
|
||||
func ExampleCommonEmail() {
|
||||
m := NewCommonMessage(ViaEmail())
|
||||
m.SendMessage("sending by email:have a drink", "boo")
|
||||
}
|
||||
|
||||
func ExampleUrgencySMS() {
|
||||
m := NewUrgencyMessage(ViaSMS())
|
||||
m.SendMessage("have a drink", "boo")
|
||||
}
|
||||
|
||||
func ExampleUrgencyEmail() {
|
||||
m := NewUrgencyMessage(ViaEmail())
|
||||
m.SendMessage("have a drink", "boo")
|
||||
}
|
||||
Reference in New Issue
Block a user