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

5 Коммитов

Автор SHA1 Сообщение Дата
Russ Cox a3cb3101ad all: delete unmodified Go 1.16 backports
Go 1.16 is available on App Engine now, so use it.

Also, Go 1.17 has been released, meaning
we don't need to keep Go 1.15 builders working.

Delete all the Go 1.16 backports except the template packages,
which contain modifications we need.

Change-Id: I4612441a1484ce9272a22268da73d67f7624309b
Reviewed-on: https://go-review.googlesource.com/c/website/+/343935
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-08-23 15:30:31 +00:00
Russ Cox d831351689 all: make compatible with Go 1.15
With the help of the backported libraries introduced in the previous CL,
we can make the whole cmd/golangorg site run on Go 1.15 again.
This will let us use App Engine standard in advance of the release
of Go 1.16 on App Engine.

Change-Id: I9d1612de6f366e0774919aa6a94af14aafb248f5
Reviewed-on: https://go-review.googlesource.com/c/website/+/323891
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-06-15 02:35:50 +00:00
Russ Cox 4c9e549253 internal/godoc: clean up use of templates
- convert from text/template to html/template
- use proper template set
- always pass *godoc.Page to templates, with custom value in .Data
- move stateful site template functions to methods on *godoc.Page
- unexport Presentation.ServeFile: ServeHTTP is good enough
- reorder api.DB.Func args to match source order (pkg first)
- rename lib/godoc/godoc.html to lib/godoc/site.html
  (lib/godoc itself must stay lib/godoc because of links to other content it holds).

Change-Id: I873f17db20107fdab11d276932e6d847a6081015
Reviewed-on: https://go-review.googlesource.com/c/website/+/317655
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-14 17:41:27 +00:00
Russ Cox 1a32f50734 internal/godoc: delete Corpus
There's nothing left in Corpus but the file system and the API database.
Hoist them into Presentation and delete the Corpus itself.

Change-Id: I2cb61b77122b2f7216b0b2a96fd6b48e29eae189
Reviewed-on: https://go-review.googlesource.com/c/website/+/317651
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-01 14:44:26 +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