[pkgsite] cmd/internal/pkgsite-cli: add kind filtering

1 view
Skip to first unread message

Ethan Lee (Gerrit)

unread,
May 18, 2026, 11:54:12 PM (8 hours ago) May 18
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Ethan Lee has uploaded the change for review

Commit message

cmd/internal/pkgsite-cli: add kind filtering

Enable filtering by kind when user specifies -symbols.
Change-Id: If239cd3abdb9030ddf51f3242888827d0468c905

Change diff

diff --git a/cmd/internal/pkgsite-cli/client/client.go b/cmd/internal/pkgsite-cli/client/client.go
index d964455..7727ab4 100644
--- a/cmd/internal/pkgsite-cli/client/client.go
+++ b/cmd/internal/pkgsite-cli/client/client.go
@@ -199,6 +199,7 @@
Module string
GOOS string
GOARCH string
+ Kind string
PaginationOptions
}

@@ -216,6 +217,9 @@
if opts.GOARCH != "" {
q.Set("goarch", opts.GOARCH)
}
+ if opts.Kind != "" {
+ q.Set("kind", opts.Kind)
+ }
if opts.Limit > 0 {
q.Set("limit", strconv.Itoa(opts.Limit))
}
diff --git a/cmd/internal/pkgsite-cli/package.go b/cmd/internal/pkgsite-cli/package.go
index d9c600f..cdd8b5f 100644
--- a/cmd/internal/pkgsite-cli/package.go
+++ b/cmd/internal/pkgsite-cli/package.go
@@ -60,6 +60,7 @@
Module: p.module,
GOOS: p.goos,
GOARCH: p.goarch,
+ Kind: p.kind,
PaginationOptions: client.PaginationOptions{
Limit: limit,
Token: token,
@@ -125,6 +126,7 @@
module string
goos string
goarch string
+ kind string
}

func (f *packageFlags) register(fs *flag.FlagSet) {
@@ -134,6 +136,7 @@
fs.BoolVar(&f.imports, "imports", false, "list imported packages")
fs.BoolVar(&f.importedBy, "imported-by", false, "list reverse dependencies")
fs.BoolVar(&f.symbols, "symbols", false, "list exported symbols")
+ fs.StringVar(&f.kind, "kind", "", "include only symbols of this kind: constant, variable, function, type, field, or method (requires -symbols)")
fs.BoolVar(&f.licenses, "licenses", false, "show license information")
fs.StringVar(&f.module, "module", "", "disambiguate module path")
}

Change information

Files:
  • M cmd/internal/pkgsite-cli/client/client.go
  • M cmd/internal/pkgsite-cli/package.go
Change size: XS
Delta: 2 files changed, 7 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention set is empty
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: If239cd3abdb9030ddf51f3242888827d0468c905
Gerrit-Change-Number: 779601
Gerrit-PatchSet: 1
Gerrit-Owner: Ethan Lee <etha...@google.com>
Gerrit-Reviewer: Ethan Lee <etha...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Ethan Lee (Gerrit)

unread,
May 18, 2026, 11:59:04 PM (8 hours ago) May 18
to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

Ethan Lee abandoned this change.

View Change

Abandoned

Ethan Lee abandoned this change

Related details

Attention set is empty
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: abandon
Gerrit-Project: pkgsite
Gerrit-Branch: master
Gerrit-Change-Id: If239cd3abdb9030ddf51f3242888827d0468c905
Gerrit-Change-Number: 779601
Gerrit-PatchSet: 1
Gerrit-Owner: Ethan Lee <etha...@google.com>
Gerrit-Reviewer: Ethan Lee <etha...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages