aboutsummaryrefslogtreecommitdiff
path: root/internal/stdlib/testdata
AgeCommit message (Collapse)Author
2025-10-23all: fix some commentscuishuang
Change-Id: Ia70b35ab9aef270692a3892629c3c81208771089 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/713360 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Sean Liao <sean@liao.dev> kokoro-CI: kokoro <noreply+kokoro@google.com> Auto-Submit: Sean Liao <sean@liao.dev> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2025-01-03all: make function and struct comments match the namescuishuang
Change-Id: Ic939b5b002e881f8041ccb95114010fe7e751f9a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/639558 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> kokoro-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
2022-08-29internal/fetch: fix extractReadmes work on _directoriescui fliter
Fixes golang/go#54388 Change-Id: I7c5255993b38547ef4933f1e25c033766816394e GitHub-Last-Rev: 36c2e0d685c35a5c6da67f232786fd51ce36bd92 GitHub-Pull-Request: golang/pkgsite#49 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/422834 Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
2022-06-17many: re-enable staticcheck and fix problemsJonathan Amsterdam
Most of the checks were about io/ioutil. There were a couple of other minor ones. I didn't address the check for strings.Title; instead, I turned off that check globally with a staticcheck.conf file. Change-Id: I286a6894fb1fd891818ab9e451c891f52a3828fc Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/412675 Reviewed-by: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com>
2021-09-03internal/stdlib: refactor getGoRepo, add clone testsJonathan Amsterdam
Refactor getGoRepo to handle both test and cloned repos. This will enable adding a third option, getting the Go repo from a local copy. Also add a test for checking the contents of a cloned repo, to make sure the clone logic is correct. Flag-protect it because it's slow and hits an external server. Change-Id: I9de50bf12fccbd4fa35aa0566bdee3cddb25edf8 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/347403 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-07-12internal: support std@dev.fuzzJulie Qiu
It is now possible to fetch std@dev.fuzz and view /std@dev.fuzz on the frontend. For golang/go#46910 Change-Id: I2fd7259840ba32ff35ca323d07412988e533ffba Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/330413 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-01-19internal/stdlib: added ability to fetch master versionSai Kiran Dasika
Added the ability to fetch the master version of a module Fixes golang/go#39973 Change-Id: I66ea0dc3a2249ac4757a3d3b478c428f13c2ec89 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/279292 Reviewed-by: Jonathan Amsterdam <jba@google.com> Trust: Julie Qiu <julie@golang.org>
2020-11-20internal: rename tc to testJulie Qiu
The variable tc is renamed to test when used to refer to a test case, for consistency throughout the rest of the codebase, which uses the variable test in most cases. Change-Id: I88a87aa020928af98e8579a299f3111718dfa044 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/271809 Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> Trust: Julie Qiu <julie@golang.org>
2020-07-27internal/stdlib: fix stdlib README for new data modelJulie Qiu
The overview tab for the stdlib package is currently displaying src/README.vendor, instead of README.md, when the use-directories experiment flag is on. This is because based on the way the std module zip is constructed, both README.md and README.vendor are present at the root for version v1.4.0-beta.1 and higher. The fetch process will then choose README.vendor to include, since it comes after README.md alphabetically. The README.vendor file is no longer included in the std zip. For golang/go#39629 Change-Id: I1c9d8fcd1776f7b58be08f5f1ec1dc1b735e736d Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/244608 Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-04-14internal/fetch: update FetchVersion to return directoriesJulie Qiu
FetchVersion will now return all of the directories in a module. Module.Directories reprsents all of the directories in a module. A directory is redefined as the path and all of the entities that exist at that path, including README, package documentation, package imports, and licenses. Change-Id: I3ebb58800102a2d705fe7bcadaa3ddb476e4d9f6 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/705335 Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-03-27internal/{etl,stdlib}: add test coverage for example classificationDmitri Shuralyov
There wasn't much test coverage for example classification in the existing test cases, making it so that subtle changes to that functionality could get through undetected. The encoding/json package has a good amount of examples, which makes it a good test case for example classification and rendering. Add specific test cases that include surrounding HTML in order to increase test coverage, especially as the next CL will be making a change to the go/doc package implementation (using the version from Go 1.14 sooner). If these tests prove to be too rigid in the future, they can be relaxed accordingly, but having more coverage should help with making a safe go/doc transition. Also fix a Markdown formatting typo in the README. Updates b/137567588. Change-Id: Icec2eb8d075db735f09967fb0c5e6991978ab0e2 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/657661 Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-03-27internal/etl: use stdlib.Zip to fetch std moduleJonathan Amsterdam
Change the fetch logic for module "std" to use the stdlib package, which clones the Go repo instead of using the proxy. Also: - Change stdlib.Zip to return a zip.Reader - Provide a test mode for stdlib.Zip that makes it use the stripped-down Go repos in testdata Fixes b/138649628. Change-Id: I9b8a73c00452873225776b258ae743d88814ff77 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/542349 Reviewed-by: Robert Findley <rfindley@google.com>
2020-03-27internal/stdlib: package for handling the Go standard libraryJonathan Amsterdam
Add a new package containing all code for treating the standard library as a special module, "std". Includes a constant for the module path, the function to convert semvers to Go tags, and a new function for building a zip file from the Go repo. Note: adding the go-git package also updated some other packages in go.mod. Updates b/138649628. Change-Id: I0fc2fe43a37825e722b8e635a39f4db3d7350766 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/538930 Reviewed-by: Julie Qiu <julieqiu@google.com>