SIGN IN SIGN UP

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-on: https://go-review.googlesource.com/c/go/+/764101
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
A
acehinnnqru committed
e122bcdc9d567c21a72ba5851488edbd073d7bfe
Parent: c4cb9a9
Committed by Michael Matloob <matloob@google.com> on 4/9/2026, 2:51:01 PM