Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 040eaa8

Browse files
author
dapeng
committed
update
1 parent 6efcc52 commit 040eaa8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/zh/guide/x-3-unit-test.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ func (d *distanceCalculator) CalculateDistanceFromOrigin(x, y int) float64 {
178178
}
179179
```
180180

181+
181182
`distanceCalculator` 的业务是计算`(x,y int)`到originPoint点的距离,`originPoint`是依赖注入的;现在我们来编写`CalculateDistanceFromOrigin`的测试函数如下:
182183
```go
183184
package test

0 commit comments

Comments
 (0)