diff options
| author | willboland <hwilliam.boland@gmail.com> | 2025-01-06 02:30:04 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-01-06 23:49:43 -0800 |
| commit | de5503ff78700f6b649899d297552f93dcbf1faa (patch) | |
| tree | 6796b24b4712674ce10aaa33e0f3a6f0d14c9d53 | |
| parent | 474edc3a7fc5dba6df422b0ed4e8708cd6ee7142 (diff) | |
| download | go-x-website-de5503ff78700f6b649899d297552f93dcbf1faa.tar.xz | |
_content/doc/tutorial/fuzz: add note about combining characters in example
Currently, the fuzzing tutorial provides a reverse function to use.
This led to some confusion on if it is production ready, which it is not.
Adds a note that the code does not handle combining characters correctly.
Fixes golang/go#69628
Change-Id: Id0f3a5699417d9249dc7061ff126aef15872cc83
GitHub-Last-Rev: 44c70a6aab2a61639a26fce28ce406475d821641
GitHub-Pull-Request: golang/website#305
Reviewed-on: https://go-review.googlesource.com/c/website/+/639216
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
| -rw-r--r-- | _content/doc/tutorial/fuzz.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/_content/doc/tutorial/fuzz.md b/_content/doc/tutorial/fuzz.md index 881ba8f9..f3916fe7 100644 --- a/_content/doc/tutorial/fuzz.md +++ b/_content/doc/tutorial/fuzz.md @@ -465,7 +465,8 @@ func Reverse(s string) string { ``` The key difference is that `Reverse` is now iterating over each `rune` in the -string, rather than each `byte`. +string, rather than each `byte`. Note that this is just an example, and does not +handle [combining characters](https://en.wikipedia.org/wiki/Combining_character) correctly. #### Run the code |
