修改部分描述,添加必要的标点符号,补充代码超链接 (#804)

This commit is contained in:
Jck
2021-10-25 23:34:42 +08:00
committed by GitHub
parent d5578df00a
commit 39dbdb7094
100 changed files with 433 additions and 414 deletions

View File

@@ -19,7 +19,7 @@ type URLStore struct {
}
```
通道和 map 一样,必须用 `make` 创建。我们会以此修改 `NewURLStore` 工厂函数并给定缓冲区大小为1000例如`save := make(chan record, saveQueueLength)`。为解决性能问题,`Put` 可以发送记录 record 到带缓冲的 `save` 通道:
通道和 map 一样,必须用 `make` 创建。我们会以此修改 `NewURLStore` 工厂函数,并给定缓冲区大小为 1000例如`save := make(chan record, saveQueueLength)`。为解决性能问题,`Put` 可以发送记录 record 到带缓冲的 `save` 通道:
```go
func (s *URLStore) Put(url string) string {
for {