mirror of
https://github.com/Estom/notes.git
synced 2026-02-07 04:23:55 +08:00
21 lines
311 B
Go
21 lines
311 B
Go
/**
|
|
* @Author:zhoutao
|
|
* @Date:2020/12/12 下午2:06
|
|
* @Desc:
|
|
*/
|
|
|
|
package strategy
|
|
|
|
func ExamplePayByCash() {
|
|
payment := NewPayment("ad", "808490523", 900, &Cash{})
|
|
payment.Pay()
|
|
//Output:
|
|
//Pay by cash
|
|
|
|
}
|
|
|
|
func ExamplePayByBank() {
|
|
payment := NewPayment("tom", "345782345", 900, &Bank{})
|
|
payment.Pay()
|
|
}
|