aboutsummaryrefslogtreecommitdiff
path: root/internal/api/api.go
AgeCommit message (Collapse)Author
2022-06-15all: fix a lot of typosFrederik Zipp
Change-Id: I0754d18f4c3c3d5dfa0c34b4bc154a35ac20b917 Reviewed-on: https://go-review.googlesource.com/c/website/+/411794 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
2021-08-23all: delete unmodified Go 1.16 backportsRuss Cox
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-06-15all: make compatible with Go 1.15Russ Cox
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-14internal/godoc: clean up use of templatesRuss Cox
- 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-01internal/godoc: delete CorpusRuss Cox
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-03-12internal/godoc: split out API version database [generated]Russ Cox
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>