golang/go

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

Ouverte

#39 907 ouverte le 29 juin 2020

 (4 commentaires) (0 réaction) (0 personne assignée)Go (19 008 forks)batch import
FeatureRequestNeedsInvestigationhelp wantedpkgsitepkgsite/dochtml

Métriques du dépôt

Stars
 (133 883 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur