golang/go

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

开放

#39,907 创建于 2020年6月29日

 (4 条评论) (0 个反应) (0 位负责人)Go (19,008 个派生)batch import
FeatureRequestNeedsInvestigationhelp wantedpkgsitepkgsite/dochtml

仓库指标

星标
 (133,883 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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 */

贡献者指南