We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaa6692 commit e419bb6Copy full SHA for e419bb6
examples/singleapp/utf8_byte_count/main.go
@@ -106,9 +106,8 @@ func manual(s string) error {
106
}
107
108
func useRune(s string) error {
109
- //lint:ignore S1029 It's ok because this is just a example.
110
- //lint:ignore SA6003 It's ok because this is just a example.
111
- for _, r := range []rune(s) {
+
+ for _, r := range s {
112
l := utf8.RuneLen(r)
113
if l == -1 {
114
return fmt.Errorf("invalid utf-8 char (%c)", r)
0 commit comments