[go] cmd/go: respect -short flag when documenting individual symbols

0 views
Skip to first unread message

Michael Matloob (Gerrit)

unread,
Apr 9, 2026, 10:51:04 AM (17 hours ago) Apr 9
to Runqian Chen, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, David Chase, Go LUCI, Michael Matloob, golang-co...@googlegroups.com

Michael Matloob submitted the change

Change information

Commit message:
cmd/go: respect -short flag when documenting individual symbols

The -short flag was ignored when documenting individual symbols (functions,
types, or variables) with "go doc -short package.symbol". This change adds
short flag checks to symbolDoc, typeDoc, and valueDoc functions.

Fixes #77192
Change-Id: I66935ceb5ffb5836dbd3a2fd2c7a33dd31e82001
Reviewed-by: David Chase <drc...@google.com>
Reviewed-by: Michael Matloob <mat...@google.com>
Reviewed-by: Michael Matloob <mat...@golang.org>
Files:
  • M src/cmd/go/internal/doc/pkg.go
  • M src/cmd/go/testdata/script/mod_doc.txt
Change size: S
Delta: 2 files changed, 29 insertions(+), 2 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Michael Matloob, +1 by David Chase, +2 by Michael Matloob
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I66935ceb5ffb5836dbd3a2fd2c7a33dd31e82001
Gerrit-Change-Number: 764101
Gerrit-PatchSet: 3
Gerrit-Owner: Runqian Chen <runqian...@gmail.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@google.com>
Gerrit-CC: Sean Liao <se...@liao.dev>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages