]> Cypherpunks repositories - gostls13.git/commit
cmd/go: show comparable in go doc interface output
authorNathan Nguyen <nhan13574@gmail.com>
Fri, 5 Dec 2025 08:25:33 +0000 (03:25 -0500)
committerSean Liao <sean@liao.dev>
Mon, 15 Dec 2025 15:32:10 +0000 (07:32 -0800)
commit388eb10f50f2b693fb68897dd0ddf627b512a885
treef3612cbd9c52ee2e3a0ac26bfd04800fed194ec1
parent1b291b70dff51732415da5b68debe323704d8e8d
cmd/go: show comparable in go doc interface output

The go doc command now displays the comparable constraint when embedded
in an interface, matching the existing behavior for the error type.

Previously, when an interface embedded comparable, it was not shown in
the documentation and incorrectly triggered the "Has unexported methods"
message even when no unexported methods existed.

Fixes #76125

Change-Id: Idaae07fcb1dfc79b1fae374f9fc68df0052ff38e
Reviewed-on: https://go-review.googlesource.com/c/go/+/727100
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/go/internal/doc/doc_test.go
src/cmd/go/internal/doc/pkg.go
src/cmd/go/internal/doc/testdata/pkg.go