mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2025-08-06 15:32:19 +00:00
修正半角标点符号
This commit is contained in:
@@ -29,7 +29,7 @@ if b {
|
||||
}
|
||||
```
|
||||
|
||||
如果需要经常做类似的转换, 包装成一个函数会更方便:
|
||||
如果需要经常做类似的转换,包装成一个函数会更方便:
|
||||
|
||||
```Go
|
||||
// btoi returns 1 if b is true and 0 if false.
|
||||
@@ -41,7 +41,7 @@ func btoi(b bool) int {
|
||||
}
|
||||
```
|
||||
|
||||
数字到布尔型的逆转换则非常简单, 不过为了保持对称, 我们也可以包装一个函数:
|
||||
数字到布尔型的逆转换则非常简单,不过为了保持对称,我们也可以包装一个函数:
|
||||
|
||||
```Go
|
||||
// itob reports whether i is non-zero.
|
||||
|
Reference in New Issue
Block a user