[pkgsite] internal/api: fix examples to use v1beta

0 views
Skip to first unread message

Jonathan Amsterdam (Gerrit)

unread,
8:11 PM (3 hours ago) 8:11 PM
to Hyang-Ah Hana Kim, Ethan Lee, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
Attention needed from Ethan Lee and Hyang-Ah Hana Kim

Jonathan Amsterdam has uploaded the change for review

Jonathan Amsterdam would like Hyang-Ah Hana Kim and Ethan Lee to review this change.

Commit message

internal/api: fix examples to use v1beta
Change-Id: I424121e604ce8b161b288c70bfaba2b94be9a3d2

Change diff

diff --git a/internal/api/api.go b/internal/api/api.go
index 80481d1..228351a 100644
--- a/internal/api/api.go
+++ b/internal/api/api.go
@@ -48,7 +48,7 @@
// ServePackage handles requests for the v1beta package metadata endpoint.
// api:route /v1beta/package/{path}
// api:desc Information about the package at {path}.
-// api:example /v1/package/golang.org/x/time/rate
+// api:example /v1beta/package/golang.org/x/time/rate
func ServePackage(w http.ResponseWriter, r *http.Request, ds internal.DataSource) (err error) {
defer derrors.Wrap(&err, "ServePackage")

@@ -98,7 +98,7 @@
// ServeModule handles requests for the v1beta module metadata endpoint.
// api:route /v1beta/module/{path}
// api:desc Information about the module at {path}.
-// api:example /v1/module/golang.org/x/time
+// api:example /v1beta/module/golang.org/x/time
func ServeModule(w http.ResponseWriter, r *http.Request, ds internal.DataSource) (err error) {
defer derrors.Wrap(&err, "ServeModule")

@@ -185,7 +185,7 @@
// api:desc The versions are in descending order.
// api:desc Only results whose version matches the regexp in the
// api:desc filter query parameter are returned.
-// api:example /v1/versions/golang.org/x/time?limit=3
+// api:example /v1beta/versions/golang.org/x/time?limit=3
func ServeModuleVersions(w http.ResponseWriter, r *http.Request, ds internal.DataSource) (err error) {
defer derrors.Wrap(&err, "ServeModuleVersions")

@@ -246,7 +246,7 @@
// api:desc Information about packages of the module at {path}.
// api:desc Only results whose path or synopsis
// api:desc matches the regexp in the filter query parameter are returned.
-// api:example /v1/packages/golang.org/x/time/rate
+// api:example /v1beta/packages/golang.org/x/time/rate
func ServeModulePackages(w http.ResponseWriter, r *http.Request, ds internal.DataSource) (err error) {
defer derrors.Wrap(&err, "ServeModulePackages")

@@ -387,7 +387,7 @@
// api:desc List of symbols for the package at {path}.
// api:desc Only results whose name or synopsis
// api:desc matches the regexp in the filter query parameter are returned.
-// api:example /v1/symbols/golang.org/x/time/rate
+// api:example /v1beta/symbols/golang.org/x/time/rate
func ServePackageSymbols(w http.ResponseWriter, r *http.Request, ds internal.DataSource) (err error) {
defer derrors.Wrap(&err, "ServePackageSymbols")

@@ -451,7 +451,7 @@
// api:desc not including packages in the same module.
// api:desc Only results whose path
// api:desc matches the regexp in the filter query parameter are returned.
-// api:example /v1/imported-by/golang.org/x/time/rate?limit=10&filter=%5E.%2A%5C.io%2F
+// api:example /v1beta/imported-by/golang.org/x/time/rate?limit=10&filter=%5E.%2A%5C.io%2F
func ServePackageImportedBy(w http.ResponseWriter, r *http.Request, ds internal.DataSource) (err error) {
defer derrors.Wrap(&err, "ServePackageImportedBy")

@@ -552,7 +552,7 @@
// api:desc the Go vulnerability database (https://vuln.go.dev).
// api:desc Only results whose ID or details
// api:desc matches the regexp in the filter query parameter are returned.
-// api:example /v1/vulns/golang.org/x/image
+// api:example /v1beta/vulns/golang.org/x/image
func ServeVulnerabilities(vc *vuln.Client) func(w http.ResponseWriter, r *http.Request, _ internal.DataSource) error {
return func(w http.ResponseWriter, r *http.Request, ds internal.DataSource) (err error) {
defer derrors.Wrap(&err, "ServeVulnerabilities")

Change information

Files:
  • M internal/api/api.go
Change size: S
Delta: 1 file changed, 7 insertions(+), 7 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Ethan Lee
  • Hyang-Ah Hana Kim
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
  • requirement is not satisfiedkokoro-CI-Passes
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: pkgsite
Gerrit-Branch: master
Gerrit-Change-Id: I424121e604ce8b161b288c70bfaba2b94be9a3d2
Gerrit-Change-Number: 777080
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathan Amsterdam <j...@google.com>
Gerrit-Reviewer: Ethan Lee <etha...@google.com>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Reviewer: Jonathan Amsterdam <j...@google.com>
Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Attention: Ethan Lee <etha...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

kokoro (Gerrit)

unread,
8:39 PM (2 hours ago) 8:39 PM
to Jonathan Amsterdam, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Ethan Lee, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
Attention needed from Ethan Lee, Hyang-Ah Hana Kim and Jonathan Amsterdam

kokoro voted kokoro-CI+1

Kokoro presubmit build finished with status: SUCCESS
Logs at: https://source.cloud.google.com/results/invocations/3c89dab8-fcf1-42c4-952d-e784f832fbcd

kokoro-CI+1
Open in Gerrit

Related details

Attention is currently required from:
  • Ethan Lee
  • Hyang-Ah Hana Kim
  • Jonathan Amsterdam
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    • requirement satisfiedkokoro-CI-Passes
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pkgsite
    Gerrit-Branch: master
    Gerrit-Change-Id: I424121e604ce8b161b288c70bfaba2b94be9a3d2
    Gerrit-Change-Number: 777080
    Gerrit-PatchSet: 1
    Gerrit-Owner: Jonathan Amsterdam <j...@google.com>
    Gerrit-Reviewer: Ethan Lee <etha...@google.com>
    Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Reviewer: Jonathan Amsterdam <j...@google.com>
    Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Jonathan Amsterdam <j...@google.com>
    Gerrit-Attention: Ethan Lee <etha...@google.com>
    Gerrit-Comment-Date: Tue, 12 May 2026 00:39:01 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages