1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-29 08:12:21 +00:00

Merge pull request #252 from fuwensun/pr1-3-1f

ch1-3-fix indentation
This commit is contained in:
chai2010 2018-08-08 11:37:04 +08:00 committed by GitHub
commit c1155fea92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -318,9 +318,9 @@ func bytes2str(s []byte) (p string) {
func str2runes(s []byte) []rune { func str2runes(s []byte) []rune {
var p []int32 var p []int32
for len(s) > 0 { for len(s) > 0 {
r, size := utf8.DecodeRuneInString(s) r, size := utf8.DecodeRuneInString(s)
p = append(p, r) p = append(p, r)
s = s[size:] s = s[size:]
} }
return []rune(p) return []rune(p)
} }