1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-17 03:02:28 +08:00

doc: format code in markdown file

This commit is contained in:
dudaodong
2022-07-20 15:44:33 +08:00
parent aad5b447c9
commit 2fd23f02f6
2 changed files with 3 additions and 8 deletions

View File

@@ -101,8 +101,6 @@ import (
) )
func main() { func main() {
assert := internal.NewAssert(t, "TestBefore")
arr := []string{"a", "b", "c", "d", "e"} arr := []string{"a", "b", "c", "d", "e"}
f := function.Before(3, func(i int) int { f := function.Before(3, func(i int) int {
return i return i
@@ -120,7 +118,7 @@ func main() {
} }
expected := []int64{0, 1, 2, 2, 2} expected := []int64{0, 1, 2, 2, 2}
assert.Equal(expected, res) fmt.Println(res) // 0, 1, 2, 2, 2
} }
``` ```

View File

@@ -101,8 +101,6 @@ import (
) )
func main() { func main() {
assert := internal.NewAssert(t, "TestBefore")
arr := []string{"a", "b", "c", "d", "e"} arr := []string{"a", "b", "c", "d", "e"}
f := function.Before(3, func(i int) int { f := function.Before(3, func(i int) int {
return i return i
@@ -119,8 +117,7 @@ func main() {
appendStr(i, arr[i], f) appendStr(i, arr[i], f)
} }
expected := []int64{0, 1, 2, 2, 2} fmt.Println(res) // 0, 1, 2, 2, 2
assert.Equal(expected, res)
} }
``` ```
@@ -297,7 +294,7 @@ func main() {
time.Sleep(5 * time.Second) time.Sleep(5 * time.Second)
close(stop) close(stop)
fmt.Println(res) //[* * * * *] fmt.Println(res) //[* * * * *]
} }
``` ```