The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
The simplest possible lark-cli plugin: one After observer that logs
every dispatched command to stderr (success or failure).
Build & run
cd extension/platform/examples/audit-observer
go build -o audit-cli .
./audit-cli config plugins show
# {"plugins":[{"name":"audit", ...}], "total":1}
./audit-cli api GET /open-apis/contact/v3/users/me
# [audit] api ok (on stderr)
Key points
platform.NewPlugin(...).MustBuild() from init(). The blank
import of this package in main.go triggers init().
Observer(platform.After, ...) runs after the command's RunE,
even on failure (Observers cannot prevent execution).
FailOpen() means: if Install ever fails, the binary logs a
warning and continues without this plugin. Right default for
audit-only plugins.
Command audit-observer is a runnable fork of lark-cli that logs
every dispatched command to stderr. Demonstrates the simplest
possible plugin: one After observer matching All commands.
Build & run:
cd extension/platform/examples/audit-observer
go build -o audit-cli .
./audit-cli config plugins show # see "audit" in the list
./audit-cli api GET /open-apis/... # observer logs to stderr