Skip to content

Commit

Permalink
testing: fix reference to B.N in docstring
Browse files Browse the repository at this point in the history
Currently, a documentation reference to a struct member (such as [B.N])
does not result in it being rendered as a link, and thus the square
brackets remain in the rendered documentation which is mildly confusing.

The issue can be seen at
https://pkg.go.dev/testing@master#hdr-b_N_style_benchmarks

Remove the square brackets to fix.

Change-Id: Id374fd2085bd511018220c5d663650f89672302e
Reviewed-on: https://go-review.googlesource.com/c/go/+/643496
Reviewed-by: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
  • Loading branch information
kolyshkin authored and adonovan committed Jan 21, 2025
1 parent 3f4164f commit 3aa7c5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/testing/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
// # b.N-style benchmarks
//
// Prior to the introduction of [B.Loop], benchmarks were written in a
// different style using [B.N]. For example:
// different style using B.N. For example:
//
// func BenchmarkRandInt(b *testing.B) {
// for range b.N {
Expand Down

0 comments on commit 3aa7c5e

Please sign in to comment.