golang/go

iter: tiny doc-comment bug

Closed this issue · 5 comments

bobg commented

Go version

go version go1.25.3 darwin/arm64

Output of go env in your module/workspace:

AR='ar'
CC='clang'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='clang++'
GCCGO='gccgo'
GO111MODULE='on'
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/Users/bobg/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/Users/bobg/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/5m/40ytkzbd2rnckzgswym5yrp00000gn/T/go-build715056930=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/Users/bobg/go/src/github.com/bobg/seqs/go.mod'
GOMODCACHE='/Users/bobg/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/bobg/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/bobg/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.25.3'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

go doc iter

What did you see happen?

In the section on "Mutation" in the package overview, the example type Pos[V any] has a method, Value, whose doc comment begins Pos returns ...

What did you expect to see?

Value returns ...

Thanks for pointing this out. Would you like to contribute a fix?

bobg commented

Very gladly, thanks for the suggestion. Will do after work, when I'm on personal time.

Change https://go.dev/cl/718321 mentions this issue: iter: fix a tiny doc comment bug

bobg commented

Looks like I can't follow simple instructions. I created the fix (as you can see) but somehow skipped the step where I use my Gmail address for the GitHub PR. (However, that address is listed as an alternate email for my GitHub identity.)

Please let me know if I need to redo the change.