1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 04:22:22 +00:00

ch1-03: 修复代码错误

This commit is contained in:
chai2010 2018-07-15 08:01:28 +08:00
parent 5008fb6ab3
commit 23fdfa8cd8

View File

@ -298,7 +298,7 @@ func str2bytes(s string) []byte {
```go
func bytes2str(s []byte) (p string) {
data := make([]byte, len(s))
for i, c := s {
for i, c := range s {
data[i] = c
}