You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
x/pkgsite: deprecated vars and consts are not rendered as deprecated #80803
While previewing docs for a change I was working on, I noticed that deprecated vars and consts are not rendered as deprecated.
Given the following module;
package deprecated
// DeprecatedVariable is not used.//// Deprecated: no longer used.varDeprecatedVariable="unused"// DeprecatedConst is not used.//// Deprecated: no longer used.constDeprecatedConst="unused"// DeprecatedFunc is not used.//// Deprecated: no longer used.funcDeprecatedFunc(){}
Rendering the documentation does not decorate the DeprecatedVariable and DeprecatedConst as deprecated;
go mod init example.com/deprecated
cat > main.go <<-'EOF'package deprecated// DeprecatedVariable is not used.//// Deprecated: no longer used.var DeprecatedVariable = "unused"// DeprecatedConst is not used.//// Deprecated: no longer used.const DeprecatedConst = "unused"// DeprecatedFunc is not used.//// Deprecated: no longer used.func DeprecatedFunc(){}EOF
go install golang.org/x/pkgsite/cmd/pkgsite@latest
go: downloading golang.org/x/pkgsite v0.3.0
pkgsite -open -http=:6060 .
Activity
gabyhelp commentedon Aug 9, 2026
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)