mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 02:35:53 +08:00
少了两个空格 (#599)
This commit is contained in:
@@ -69,7 +69,7 @@ allNewBMWs := allCars.FindAll(func(car *Car) bool {
|
||||
4)我们也可以根据参数返回不同的函数。也许我们想根据不同的厂商添加汽车到不同的集合,但是这(这种映射关系)可能会是会改变的。所以我们可以定义一个函数来产生特定的添加函数和 map 集:
|
||||
|
||||
```go
|
||||
func MakeSortedAppender(manufacturers[]string)(func(car*Car),map[string]Cars) {
|
||||
func MakeSortedAppender(manufacturers []string)(func(car *Car),map[string]Cars) {
|
||||
// Prepare maps of sorted cars.
|
||||
sortedCars := make(map[string]Cars)
|
||||
for _, m := range manufacturers {
|
||||
|
Reference in New Issue
Block a user