golang/go

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

オープン

#39,907 opened on 2020/06/29

 (4 件のコメント) (0 件のリアクション) (0 人の担当者)Go (19,008 件のフォーク)batch import
FeatureRequestNeedsInvestigationhelp wantedpkgsitepkgsite/dochtml

Repository metrics

Stars
 (133,883 個のスター)
PR merge metrics
 (30d に merged 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 */

コントリビューターガイド