mirror of
https://github.com/Estom/notes.git
synced 2026-04-07 21:08:37 +08:00
go知识重新整理
This commit is contained in:
20
Go/DesignPattern/state/state_test.go
Normal file
20
Go/DesignPattern/state/state_test.go
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @Author:zhoutao
|
||||
* @Date:2020/12/12 下午2:53
|
||||
* @Desc:
|
||||
*/
|
||||
|
||||
package state
|
||||
|
||||
func ExampleWeek() {
|
||||
ctx := NewTodayContext()
|
||||
todayAndNext := func() {
|
||||
ctx.Today()
|
||||
ctx.Next()
|
||||
}
|
||||
|
||||
for i := 0; i < 8; i++ {
|
||||
todayAndNext()
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user