]> Cypherpunks repositories - gostls13.git/commit
strings: correct NewReader documentation
authorJabar Asadi <jasadi@d2iq.com>
Wed, 10 May 2023 21:44:14 +0000 (21:44 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 12 May 2023 17:40:51 +0000 (17:40 +0000)
commit9eceffdf12dc4497ee162c005d5e14bb509797b9
tree67bf005cc6ed7b8f3c97003357cb8c98e146e214
parent7cc4516ac8305acf3689a2b755932512a1bf6efd
strings: correct NewReader documentation

The provided description for `NewReader` says that the underlying string is read-only. but the following example shows that this is not the case.
<br />

rd := strings.NewReader("this is a text")

rd.Reset("new text") <--- underlying string gets updated here

Change-Id: I95c7099c2e63670c84307d4317b702bf13a4025a
GitHub-Last-Rev: a16a60b0f1e25d19e05e664c5b41ca57c4fcd9b2
GitHub-Pull-Request: golang/go#60074
Reviewed-on: https://go-review.googlesource.com/c/go/+/493817
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
src/strings/reader.go