Skip to content

Commit 09114fa

Browse files
alex-semenyukmway
andauthored
Fix header for string-byte-slice (#202)
Clarify that the intent for string-to-byte conversions is to avoid repeated conversions. --------- Co-authored-by: alex-semenyuk <[email protected]> Co-authored-by: Matt Way <[email protected]>
1 parent 55fc8cf commit 09114fa

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
- [No goroutines in `init()`](goroutine-init.md)
3232
- [Performance](performance.md)
3333
- [Prefer strconv over fmt](strconv.md)
34-
- [Avoid string-to-byte conversion](string-byte-slice.md)
34+
- [Avoid repeated string-to-byte conversions](string-byte-slice.md)
3535
- [Prefer Specifying Container Capacity](container-capacity.md)
3636
- Style
3737
- [Avoid overly long lines](line-length.md)

src/string-byte-slice.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Avoid string-to-byte conversion
1+
# Avoid repeated string-to-byte conversions
22

33
Do not create byte slices from a fixed string repeatedly. Instead, perform the
44
conversion once and capture the result.

style.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
- [No goroutines in `init()`](#no-goroutines-in-init)
3939
- [Performance](#performance)
4040
- [Prefer strconv over fmt](#prefer-strconv-over-fmt)
41-
- [Avoid string-to-byte conversion](#avoid-string-to-byte-conversion)
41+
- [Avoid repeated string-to-byte conversions](#avoid-repeated-string-to-byte-conversions)
4242
- [Prefer Specifying Container Capacity](#prefer-specifying-container-capacity)
4343
- [Style](#style)
4444
- [Avoid overly long lines](#avoid-overly-long-lines)
@@ -2192,7 +2192,7 @@ BenchmarkStrconv-4 64.2 ns/op 1 allocs/op
21922192
</td></tr>
21932193
</tbody></table>
21942194

2195-
### Avoid string-to-byte conversion
2195+
### Avoid repeated string-to-byte conversions
21962196

21972197
Do not create byte slices from a fixed string repeatedly. Instead, perform the
21982198
conversion once and capture the result.

0 commit comments

Comments
 (0)