@@ -39,6 +39,10 @@ type Repo struct {
39
39
// https://golang.org/pkg/#subrepo.
40
40
// It should be plain text. Hostnames may be auto-linkified.
41
41
WebsiteDesc string
42
+
43
+ // usePkgGoDev controls whether the repo has opted-in to use
44
+ // pkg.go.dev for displaying documentation for Go packages.
45
+ usePkgGoDev bool
42
46
}
43
47
44
48
// ByGerritProject maps from a Gerrit project name ("go", "net", etc)
@@ -73,7 +77,7 @@ func init() {
73
77
x ("net" , desc ("additional networking packages" ))
74
78
x ("oauth2" )
75
79
x ("perf" , desc ("packages and tools for performance measurement, storage, and analysis" ))
76
- x ("pkgsite" , desc ("home of the pkg.go.dev website" ), noBuildAndNoDash )
80
+ x ("pkgsite" , desc ("home of the pkg.go.dev website" ), usePkgGoDev (), noBuildAndNoDash )
77
81
x ("playground" , noDash )
78
82
x ("review" , desc ("a tool for working with Gerrit code reviews" ))
79
83
x ("scratch" , noDash )
@@ -119,6 +123,7 @@ func coordinatorCanBuild(r *Repo) { r.CoordinatorCanBuild = true }
119
123
func importPath (v string ) modifyRepo { return func (r * Repo ) { r .ImportPath = v } }
120
124
121
125
func desc (v string ) modifyRepo { return func (r * Repo ) { r .WebsiteDesc = v } }
126
+ func usePkgGoDev () modifyRepo { return func (r * Repo ) { r .usePkgGoDev = true } }
122
127
123
128
// addMirrored adds a repo that's on Gerrit and mirrored to GitHub.
124
129
func addMirrored (proj string , opts ... modifyRepo ) {
@@ -191,3 +196,7 @@ func (r *Repo) ShowOnDashboard() bool { return r.showOnDashboard }
191
196
// at or is mirrored to. It returns the empty string if this repo has no
192
197
// GitHub presence.
193
198
func (r * Repo ) GitHubRepo () string { return r .gitHubRepo }
199
+
200
+ // UsePkgGoDev reports whether the repo has opted-in to use
201
+ // pkg.go.dev for displaying documentation for Go packages.
202
+ func (r * Repo ) UsePkgGoDev () bool { return r .usePkgGoDev }
0 commit comments