Skip to content

x/pkgsite/internal/fetch/dochtml/internal/render: leave a sample of values when trimming large string literals and composite literals #39907

Open
@pjebs

Description

@pjebs

In godoc.org: https://godoc.org/github.com/rocketlaunchr/google-search (for example),

If you have a map package-level variable with many many predefined values, it doesn't display any of them:

var GoogleDomains = map[string]string{ /* 198 elements not displayed */

}

It would be more useful if displayed some values to give an idea of the kind of values stored:

var GoogleDomains = map[string]string{
	"us":  "https://www.google.com/search?q=",
	"ac":  "https://www.google.ac/search?q=",
	"ad":  "https://www.google.ad/search?q=",
	... /* 195 elements not displayed */

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.help wantedpkgsitepkgsite/dochtmlIssues related to package documentation in pkgsite

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions