]> Cypherpunks repositories - gostls13.git/commitdiff
bytes: correct Map documentation
authorGabriel Aszalos <gabriel.aszalos@gmail.com>
Wed, 4 Oct 2017 13:58:36 +0000 (16:58 +0300)
committerIan Lance Taylor <iant@golang.org>
Wed, 4 Oct 2017 14:27:22 +0000 (14:27 +0000)
Fix incorrect reference to string instead of byte slice.

Change-Id: I95553da32acfbcf5dde9613b07ea38408cb31ae8
Reviewed-on: https://go-review.googlesource.com/68090
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/bytes/bytes.go

index 286cd4454dcf72ea83ca1992d51f6aa999c7415a..40d76be0945126aff781cf8183b6d3f15f681ea0 100644 (file)
@@ -405,7 +405,7 @@ func HasSuffix(s, suffix []byte) bool {
 
 // Map returns a copy of the byte slice s with all its characters modified
 // according to the mapping function. If mapping returns a negative value, the character is
-// dropped from the string with no replacement. The characters in s and the
+// dropped from the byte slice with no replacement. The characters in s and the
 // output are interpreted as UTF-8-encoded code points.
 func Map(mapping func(r rune) rune, s []byte) []byte {
        // In the worst case, the slice can grow when mapped, making