Граф коммитов

814 Коммитов

Автор SHA1 Сообщение Дата
Russ Cox fea2f6fad6 blog: delete per-repo files, update README.md, go.mod
It would be nice to delete go.mod and let the directory
be part of the x/website module, but right now x/website
requires Go 1.16 and the blog runs on App Engine which
doesn't yet support Go 1.16. So the blog is actually requiring
an older, pre-Go 1.16 version of x/website.

Once App Engine updates to Go 1.16 we can take that next
step of making blog not a submodule.

Or perhaps before that we will get to the point of serving the
blog from the cmd/golangorg server.

One way or another, this will get even simpler.

Change-Id: I04f9b4d4433009c8b204acba9043b2d8a6261189
Reviewed-on: https://go-review.googlesource.com/c/website/+/322791
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-26 13:23:13 +00:00
Russ Cox 212bb63fb0 website: merge x.blog branch
The x.blog branch was created out-of-band by rewriting the
x/blog history to have this repo's first commit as its initial commit
and moving all the work into a blog/ subdirectory.

This merge brings the blog/ subdirectory into the main branch
of x/website.

After this merge, all work on the blog will happen here in x/website,
first in the blog/ directory and then eventually merged into the website
proper.

Change-Id: I25b94377a1f111ee0a640afcb7e2e4a4384d0733
2021-05-25 20:54:42 -04:00
Russ Cox d3553d9638 [x/blog] README.md: fix link
Change-Id: If95523697fe41cd0856abb156c6aeb6cd1f52ddf
Reviewed-on: https://go-review.googlesource.com/c/blog/+/322749
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
X-Blog-Commit: da446da101b2109b6e2620b626056f86e6dbc490
2021-05-26 00:23:40 +00:00
Russ Cox e3a24de675 [x/blog] blog: update README.md for new cloud build process
Change-Id: I270365170c5871526901df519bba9d5b3819fae3
Reviewed-on: https://go-review.googlesource.com/c/blog/+/321670
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
X-Blog-Commit: d7632d2bbca5e02e40264009bacd9496de5f43c5
2021-05-26 00:21:46 +00:00
Katie Hockman 9966d5e6bf _content: replace usages of "stutter"
Replace the use of "stutter" with a word which
more clearly conveys the meaning.

Change-Id: I1411e721f033a9600c023691e31e150b94c64b6d
Reviewed-on: https://go-review.googlesource.com/c/website/+/322671
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2021-05-26 00:14:51 +00:00
Katie Hockman 9a732f1e00 [x/blog] _content/package-names: remove usage of "stutter"
Replace the use of "stutter" with a word which
more clearly conveys the meaning.

Change-Id: Ib1278d9eb24f5c84ed1f6e121493b6690f549687
Reviewed-on: https://go-review.googlesource.com/c/blog/+/322633
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Sameer Ajmani <ajmani@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
X-Blog-Commit: f7888dee675b21953ddf396045cf4433fd692d3d
2021-05-25 22:32:20 +00:00
Russ Cox f2f7a694fa [x/blog] support/racy: delete program, inline into article
Change-Id: I1ba0d4aacdf23cf3378c7ab82af78d3940aff136
Reviewed-on: https://go-review.googlesource.com/c/blog/+/321669
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
X-Blog-Commit: ca2da54016440ba553b4b939b1ba248fd1d9b1bc
2021-05-21 00:22:44 +00:00
Russ Cox 6edac51689 cmd/golangorg: remove special cases for /project/, /doc/devel/release
The special cases were simulating the normal template execution
and passing extra data (the release history).
We have a standard way to pass extra data (template functions),
so use one and delete the special case code.

Also change date format to standard yyyy-mm-dd.
The yyyy/mm/dd we have been using is kind of made up
and certainly unusual (see https://xkcd.com/1179/).

Change-Id: I59f4f67259381dd43cd53c0f6120f87d8f8c77d9
Reviewed-on: https://go-review.googlesource.com/c/website/+/296429
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-18 15:19:37 +00:00
shulhan 7267ca91e4 [x/blog] _content: fix broken links in cgo article
The correct links to sections on cmd/go page are prefixed with "hdr-".

Change-Id: I8301a8f93c2a6ebbc3d67a9a82c809e776976922
Reviewed-on: https://go-review.googlesource.com/c/blog/+/319470
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
X-Blog-Commit: 594fa988c67b77baa1b04aa1ae57dc507f2f8045
2021-05-13 17:13:29 +00:00
Heschi Kreinick c1bd207ca8 cmd/golangorg,internal/history: document Go 1.16.4 and Go 1.15.12
1.16.4 and 1.15.12 are our first releases containing public security
fixes. As such, the existing template doesn't work well for them, so use
a CustomSummary.

Change-Id: Ib70990425b1a2963030b1034295a20b4c105c630
Reviewed-on: https://go-review.googlesource.com/c/website/+/317609
Trust: Heschi Kreinick <heschi@google.com>
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-05-06 18:38:36 +00:00
yangwenmai 61aee95efe internal/dl: simplify featured macOS file regexp
The current macOS release filenames no longer include a "-osx10.8"
suffix, so the featured file regexp can made shorter and simpler.

Change-Id: Ia6a1b58e20909ba9485e02b51ee4b0297f6ff20e
Reviewed-on: https://go-review.googlesource.com/c/website/+/293589
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Cherry Zhang <cherryyz@google.com>
2021-04-30 16:32:06 +00:00
Sean Liao 43994a6723 _content/doc: fix gitconfig typo
Fixes golang/go#45691

Change-Id: I6ad64a06853d153f90636583abede168573b89b6
Reviewed-on: https://go-review.googlesource.com/c/website/+/313189
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Cherry Zhang <cherryyz@google.com>
2021-04-30 16:30:45 +00:00
Russ Cox c457bca863 [x/blog] _content/survey2020-results: add custom anchor names
Change-Id: Id322111063e81e061437641d05f580283236096a
Reviewed-on: https://go-review.googlesource.com/c/blog/+/314174
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
X-Blog-Commit: efbf96da94beac4892c106d5e5eff495a7688b52
2021-04-27 16:31:12 +00:00
Russ Cox 2cc45bf07e [x/blog] _template: make headings self-hyperlinks
This makes it easy to get a section link by clicking on the section heading.
Also add support for {#ID} in Markdown, in addition to the auto-generated anchors.

Change-Id: Idd9d6c7cec2395f86808220c885861dc6c45e9d6
Reviewed-on: https://go-review.googlesource.com/c/blog/+/314173
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
X-Blog-Commit: d5f68129df4102cd8ec637a7521d733978bc0c76
2021-04-27 16:31:11 +00:00
Russ Cox 933e4e0efd [x/blog] app.yaml: remove GOLANGORG_CHECK_COUNTRY
Nothing in this package or its dependencies uses this variable,
after CL 293449.

Change-Id: I5abb409616bdbe991bb2cbb0014c358090b197f7
Reviewed-on: https://go-review.googlesource.com/c/blog/+/295213
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
X-Blog-Commit: 89efb9b5f23c0a21eb4d9b754f428344dbf60a48
2021-04-27 16:31:10 +00:00
Russ Cox c58d59840a [x/blog] all: go get golang.org/x/tools@6397a116 && go mod tidy
Bring in CL 293449 to remove /share playground proxy,
plus other recent work.

Change-Id: Ie7cd016fd6909d7be262f82b2a21208e6fdd3d78
Reviewed-on: https://go-review.googlesource.com/c/blog/+/296370
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
X-Blog-Commit: c6b45b36a1e4648c377a56412f2f64d4c1ebadbb
2021-04-27 16:31:09 +00:00
Russ Cox 1085eb1359 [x/blog] all: mv content _content; mv template _template
Moving these into underscore directories
hides them from "go mod tidy",
which otherwise wants to add a dependency
on gorilla for content/context/*.go.

Also update appengine.go and local.go
to know about new locations.

Change-Id: I7e1eaee7aaa971ee39c6c0e3cca475086443fbae
Reviewed-on: https://go-review.googlesource.com/c/blog/+/296369
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
X-Blog-Commit: d6ab486137afa7054e7ab8fd20e6facdc5a162b8
2021-04-27 16:31:01 +00:00
Yu, Li-Yu 1eaa20f5b9 internal/pkgdoc: fix synopsis pkg name == dir name matching
file.Name.Name should match the directory name not the filename.

In CL 296378, newDirTree's name parameter was removed and synopsis
matched against the filename of the source code, e.g. "*.go".

Fixes golang/go#45042
Fixes golang/go#45614

Change-Id: Ifa4c8a70429e277efb1f9f726de9249509cbcee0
Reviewed-on: https://go-review.googlesource.com/c/website/+/311089
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Cherry Zhang <cherryyz@google.com>
2021-04-26 16:24:13 +00:00
Alexander Rakoczy 8e455e2223 all: update x/build version for vulndb
See instructions at https://golang.org/wiki/CreatingSubRepository

For golang/go#45519

Change-Id: I4765a5be426ff4315fea8534d250696dccb7317e
Reviewed-on: https://go-review.googlesource.com/c/website/+/312732
Run-TryBot: Alexander Rakoczy <alex@golang.org>
Trust: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-04-23 15:19:34 +00:00
Dmitri Shuralyov cd74f7187b [x/blog] template: remove search box
The custom search algorithm that was previously implemented and served
on the golang.org website has been removed via CL 292590 and CL 293412,
so remove the search box in the blog.golang.org header too.

For golang/go#44357.
Fixes golang/go#44912.

Change-Id: I51478ccb568e94df50d0dc6920a26c8f30a04c3c
Reviewed-on: https://go-review.googlesource.com/c/blog/+/311969
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
X-Blog-Commit: 5d47918ba6b83a86f5752483a2310cda931dd255
2021-04-20 20:02:28 +00:00
Jay Conrod 7b9374a7ae _content/doc/modules: fix typo
Thanks to Manoj Krishnan (@meetmanok) for pointing this out.

Change-Id: I821eba8fe32773bea392629e34f8a2f88e37cc7f
Reviewed-on: https://go-review.googlesource.com/c/website/+/310549
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2021-04-16 20:31:13 +00:00
Jay Conrod ab09019332 _content/doc: fix anchor for 'go.sum files' heading
Goldmark drops id characters after '.'.

Change-Id: I30cfde221900e91479338adbc069f6805feced5d
Reviewed-on: https://go-review.googlesource.com/c/website/+/310752
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-04-16 16:10:57 +00:00
Jay Conrod fee037ff05 _content/doc: document module deprecation
For golang/go#40357

Change-Id: Iba0e912123287ed4fe5b0a34acca76b883046529
Reviewed-on: https://go-review.googlesource.com/c/website/+/309529
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-04-16 14:13:20 +00:00
Katie Hockman d4cd530674 [x/blog] content: add link to Go Module Proxy talk
Change-Id: I03257e7d8e1a243e63374af79d06585f229a6638
Reviewed-on: https://go-review.googlesource.com/c/blog/+/310518
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
X-Blog-Commit: 284484f1bcf685e509fbab127e155e24f9138ac4
2021-04-15 21:56:45 +00:00
Ahmet Aktürk 0cf64a47e9 _content/doc: fix grammar in mod.md
Change-Id: I8b40c59e567eb874c37f17adf8727575dddf205a
Reviewed-on: https://go-review.googlesource.com/c/website/+/308389
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-04-08 21:39:15 +00:00
Jay Conrod 01ee65b24b _content/doc: add missing quote in GOSUMDB documentation
Fixes golang/go#45439

Change-Id: I2e8b0b66c016033ca08b4821c6534d01ba267b8c
Reviewed-on: https://go-review.googlesource.com/c/website/+/308429
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-04-08 14:15:47 +00:00
Sean Liao 7ae23cbbe8 _content/doc: fix go mod edit link in mod.md
Change-Id: I979dcf6b9e097abc70affdf222fd5b7e296a3fd2
Reviewed-on: https://go-review.googlesource.com/c/website/+/291869
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-04-05 21:38:26 +00:00
Sean Liao 97803416bb internal/dl: include old unstable release in archive
Updates golang/go#17574
Fixes golang/go#37581
Fixes golang/go#43975

Change-Id: I31cab4b8f8277b3c83ddde001f2649bb5f0bc9c7
Reviewed-on: https://go-review.googlesource.com/c/website/+/290310
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-04-05 21:38:05 +00:00
Jay Conrod 0466041812 _content/doc: add a page explaining 'go get' deprecation
'go get' will link here when the arguments refer to main packages and
the -d flag is not enabled.

For golang/go#43684

Change-Id: I62045a4451bb767a83d9401665420b164c6ca255
Reviewed-on: https://go-review.googlesource.com/c/website/+/305649
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2021-04-05 19:31:52 +00:00
Frederik Zipp 940ee25bc9 _content/doc: fix typos in modules reference
Change-Id: Ic882dbe8392acd296168911794c036e4f294022c
Reviewed-on: https://go-review.googlesource.com/c/website/+/306949
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-04-02 21:11:02 +00:00
Carlos Amedee a49366dd89 internal/dl: remove unlikely releasers from validUser
This change removes adg, bradfitz, cbro, andybons and julieqiu from
the list of valid users. They are not expected to be releasing Go at
any point in the near future.

Change-Id: I38fd878f4c9487402ad61bab8b3d8c6437dd9763
Reviewed-on: https://go-review.googlesource.com/c/website/+/305689
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-04-02 18:39:17 +00:00
Dmitri Shuralyov 363b0256a3 internal/history: document Go 1.16.3 and Go 1.15.11
For golang/go#45334.
For golang/go#45333.

Change-Id: I7928cf48bad658ca7dd391b84802e0c8bb788617
Reviewed-on: https://go-review.googlesource.com/c/website/+/306670
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2021-04-01 21:26:54 +00:00
Noah S-C e7d694f145 _content/doc: update link to Gophers Discord
Changed to vanity URL after becoming a Discord Partnered server.

Change-Id: I8c59574697c8202b7fe1777478d3abe708d02301
GitHub-Last-Rev: 5f857b73e8
GitHub-Pull-Request: golang/website#45
Reviewed-on: https://go-review.googlesource.com/c/website/+/306049
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
2021-03-31 15:46:00 +00:00
Carlos Amedee ae515ad5b7 internal/dl: add cherryyz, drchase and mknyszek to validUser
Change-Id: I22025263b8d33e236671748fad9ef46ebc4441d1
Reviewed-on: https://go-review.googlesource.com/c/website/+/305531
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-03-29 18:21:25 +00:00
Jay Conrod 0df2b77186 _content/doc/modules: fix typos
Fixes golang/go#45204
Fixes golang/go#45205

Change-Id: Ieb9f06a5eb35b2cc7d312a97db1293132e81251a
Reviewed-on: https://go-review.googlesource.com/c/website/+/304469
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Steve Traut <straut@google.com>
2021-03-24 17:33:55 +00:00
Jay Conrod 0d94d28430 _content/doc: add details about semantics of go directive in go.mod
Change-Id: I53a86d44165cd5a8f7fa523dd914fb1b127bf953
Reviewed-on: https://go-review.googlesource.com/c/website/+/301349
Trust: Jay Conrod <jayconrod@google.com>
Trust: Steve Traut <straut@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Steve Traut <straut@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-03-19 21:57:54 +00:00
shulhan fd94d8359c [x/blog] content: fix broken links and use HTTPS on godoc.article
The article contains links to code for strings.HasPrefix that reference
the wrong line number and URL to search for "Deprecated:" identifier
which also not working anymore.

This commit fix the line number link for strings.HasPrefix and
remove the line that describe examples for searching "Deprecated:"
identifier.

While at it, use HTTPS for link to Docstring and update the link
on Javadoc to latest location (according to the page redirect URL).

Signed-off-by: shulhan <m.shulhan@gmail.com>
Change-Id: Ife267af49c0816df2b3934d075c7a9a09eaac83e
Reviewed-on: https://go-review.googlesource.com/c/blog/+/302729
Reviewed-by: Ian Lance Taylor <iant@golang.org>
X-Blog-Commit: 181b0cc4321bcd631c6c87654dd4840acfdcd568
2021-03-19 17:01:56 +00:00
Alberto Donizetti 5c0ab37769 internal/dl: fix links to module proxy configuration
The downloads page has a link pointing to a section about module proxy
servers in the cmd/go doc that was removed in CL 282615. Remove the
anchor.

Fixes golang/go#44780

Change-Id: Ifb7f4f991b3314a3cda6d00d77925401a8830456
Reviewed-on: https://go-review.googlesource.com/c/website/+/299129
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-03-18 09:49:56 +00:00
Keith Randall 372c93a8a0 doc: describe how Zero optimization might change results of incorrect reflect.Value comparison
Update golang/go#33136
Update golang/go#43993

Change-Id: I306a8fd60a4d58cfd338edea4f21690338bf9a0b
Reviewed-on: https://go-review.googlesource.com/c/website/+/302269
Trust: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-03-17 01:23:49 +00:00
Sean Liao 254f4b84c9 cmd/golangorg: fix local docker instructions
Change-Id: Iada6af41a5831af6ff2a5d1e3459529992eb95d3
Reviewed-on: https://go-review.googlesource.com/c/website/+/290229
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Bryan C. Mills <bcmills@google.com>
2021-03-16 15:48:23 +00:00
Ian Lance Taylor 686df8bfd7 _content/doc/go1.16: explicitly point out ios as a build tag
For golang/go#44626
For golang/go#40700

Change-Id: I42c064f1d7a7bda42cd1de161a923720021eeda5
Reviewed-on: https://go-review.googlesource.com/c/website/+/296849
Trust: Ian Lance Taylor <iant@golang.org>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-03-15 23:56:01 +00:00
Russ Cox 6ff312ae7c _content/doc: remove redundant Path metadata
CL 251343 (Feb 12) changed the default service URL for _content/doc/x.html
from https://golang.org/doc/x.html to https://golang.org/doc/x.
Remove Path metadata that simply restates this new default.

Change-Id: Ia132c08f200c5a93554755cd1cd8429c9f8f3062
Reviewed-on: https://go-review.googlesource.com/c/website/+/296382
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-03-12 19:58:12 +00:00
Russ Cox da157ef312 _content: remove trailing spaces
Change-Id: Ide6008487c296dbd8d8f8cd6bd4eae54c2590127
Reviewed-on: https://go-review.googlesource.com/c/website/+/296381
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-03-12 19:58:11 +00:00
Russ Cox 7fe51e8c4a internal/godoc: split package docs into new package pkgdoc [generated]
Isolate package docs scanning and extraction into a new package.
Generated by script below.

[git-generate]
cd internal/godoc
rf '
	# We want to end up with each package having its own toFS,
	# but to keep each step leaving a valid package, export toFS as ToFSPath
	# so it can be used as pkgdoc.ToFSPath after the move.
	# We will rewrite the uses left behind after the move.
	mv toFS ToFSPath

	mv newDirTree newDir
	mv Directory Dir
	mv Dir.listing Dir.List
	mv Dir.lookup Dir.Lookup
	mv \
		ToFSPath \
		Dir \
		Dir.Name \
		DirList \
		DirEntry \
		DirEntry.Name \
		Dir.Lookup \
		Dir.List \
		newDir \
		isPkgFile \
		isPkgDir \
		Dir.walk \
		walkDirs \
		parseFile \
		parseFiles \
		linePrefix \
		replaceLinePrefixCommentsWithBlankLine \
		dir.go

	mv stripExampleSuffix TrimExampleSuffix
	mv splitExampleName SplitExampleName
	mv poorMansImporter simpleImporter

	mv dirtrees_test.go dir_test.go

	mv \
		DocTree \
		NewDocTree \
		PageInfo \
		PageInfo.IsEmpty \
		PageInfoMode \
		NoFiltering \
		modeNames \
		PageInfoMode.String \
		GetPageInfoMode \
		DocTree.GetPageInfo \
		DocTree.includePath \
		simpleImporter \
		packageExports \
		funcsByName \
		funcsByName.Len \
		funcsByName.Swap \
		funcsByName.Less \
		collectExamples \
		globalNames \
		addNames \
		SplitExampleName \
		TrimExampleSuffix \
		startsWithUppercase \
		doc.go

	mv \
		TestIgnoredGoFiles \
		TestIssue5247 \
		doc_test.go

	mv dir.go dir_test.go doc.go doc_test.go golang.org/x/website/internal/pkgdoc

	# Add a new toFS and rewrite the uses left behind.
	add server.go:/^\)/ \
		// toFS returns the io/fs name for path (no leading slash). \
		func toFS(name string) string { \
			if name == "/" { \
				return "." \
			} \
			return path.Clean(strings.TrimPrefix(name, "/")) \
		}

	ex {
		import "golang.org/x/website/internal/pkgdoc"
		var x string
		pkgdoc.ToFSPath(x) -> toFS(x)
	}
'
rm dirtrees.go parser.go
cd ../pkgdoc
rf '
	# Finish toFS split
	mv ToFSPath toFS

	# Clean up API for package pkgdoc
	mv PageInfo Page
	mv DocTree.GetPageInfo Doc.Page

	mv DocTree Docs
	mv NewDocTree NewDocs

	mv PageInfoMode Mode
	mv GetPageInfoMode ParseMode
	mv NoFiltering ModeAll
	mv FlatDir ModeFlat
	mv AllMethods ModeMethods
	mv ShowSource ModeSrc
	mv NoTypeAssoc ModeBuiltin
'

Change-Id: I24384f40739af286c528beb06aa153843005a870
Reviewed-on: https://go-review.googlesource.com/c/website/+/296380
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-03-12 19:58:10 +00:00
Russ Cox a4e42960dc internal/godoc: remove pathpkg renaming
This makes various other code movement a bit nicer.

Change-Id: I89c46dcbf3019eead4922f4db301bf0ea82b697e
Reviewed-on: https://go-review.googlesource.com/c/website/+/296379
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-03-12 19:58:08 +00:00
Russ Cox a3455e4f5b internal/godoc: simplify, isolate pkg docs tree code
- IsGOROOT is always true (the only docs we serve)
- SummarizePackage is unused
- newDirectory is only called on the root with unlimited depth
- Name is redundant with Path
- Directory.Depth is unused
- only DirEntry is assigned to dirEntryOrFileInfo
- parallel walk is only needed for huge trees (GOROOT is not)
- separate entirely from Corpus
- pull new DocTree out of handlerServer

This will let us better separate the package doc tree from HTTP service
and from the general document server.

Change-Id: Iac667a0ff624306cdd535a33dd22dcb04062b46c
Reviewed-on: https://go-review.googlesource.com/c/website/+/296378
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-03-12 19:58:07 +00:00
Russ Cox b09c5abe08 internal/godoc: remove unused configuration
There is lots of dead flexibility in this code.
Remove it, to make the control flow and data dependencies
easier to understand.

Change-Id: Ie9aa7bc96afc64d2a07677a73f8fb311808ef307
Reviewed-on: https://go-review.googlesource.com/c/website/+/296377
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-03-12 19:58:06 +00:00
Russ Cox f46db3cc1a internal/godoc: split out API version database [generated]
Extract API database into a standalone package.
Generated with rf script below.

[git-generate]
cd internal/godoc
rf '
	mv apiVersions DB
	mv DB.sinceVersionFunc DB.Func
	mv pkgAPIVersions PkgDB
	mv PkgDB.typeSince PkgDB.Type
	mv PkgDB.methodSince PkgDB.Method
	mv PkgDB.funcSince PkgDB.Func
	mv PkgDB.fieldSince PkgDB.Field
	mv parsePackageAPIInfo Load
	mv versionedRow row
	mv versionParser dbParser

	mv DB PkgDB \
		DB.Func \
		Load \
		dbParser \
		dbParser.parseFile \
		row \
		parseRow \
		api.go

	mv versions_test.go api_test.go

	mv api.go api_test.go golang.org/x/website/internal/api
'
cd ../api
rf '
	mv dbParser parser
'

Change-Id: I1bf57608345ae39eb217024c9c4bf1ae6543bd98
Reviewed-on: https://go-review.googlesource.com/c/website/+/296376
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-03-12 19:58:05 +00:00
Russ Cox 4e76d9d0e0 internal/godoc: factor out example, ast support funcs
Moved with

rf '
	mv \
		Presentation.example_htmlFunc \
		replaceLeadingIndentation \
		exampleOutputRx \
		filterOutBuildAnnotations \
		Presentation.example_nameFunc \
		Presentation.example_suffixFunc \
		splitExampleName \
		stripExampleSuffix \
		startsWithUppercase \
		examplefuncs.go

	mv \
		slashSlash \
		Presentation.nodeFunc \
		Presentation.node_htmlFunc \
		Presentation.writeNode \
		firstIdent \
		comment_htmlFunc \
		sanitizeFunc \
		astfuncs.go
	rm Presentation.WriteNode

'

plus deleting the doc comments and import path comments,
which didn't move well.

Change-Id: I71b1dd58527938cafccfc901a0dadcc6dff34664
Reviewed-on: https://go-review.googlesource.com/c/website/+/296375
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-03-12 19:58:03 +00:00
Russ Cox 28d7606f40 internal/godoc: introduce TabSpacer
Mainly just isolate it from Presentation, but give it a nice API too.

Change-Id: I9650bf650a15bfd814fe4da58de6fa133a858d90
Reviewed-on: https://go-review.googlesource.com/c/website/+/296374
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-03-12 19:58:02 +00:00