cli

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 66 Imported by: 0 modules, 0 packages

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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string, in io.Reader, out io.Writer, errOut io.Writer) int

func RunContext added in v0.2.0

func RunContext(ctx context.Context, args []string, in io.Reader, out io.Writer, errOut io.Writer) int

RunContext 让嵌入式调用方把取消信号传到每一条网络数据命令。

func RunContextWithBrokenPipeSignals added in v0.8.0

func RunContextWithBrokenPipeSignals(ctx context.Context, args []string, in io.Reader, out io.Writer, errOut io.Writer, enablePipelineSignal, enableMCPBrokenPipeSignal func() func()) int

RunContextWithBrokenPipeSignals 仅供二进制入口传入平台的 SIGPIPE 控制器。普通 NDJSON 输出和 MCP stdio 必须分别传入控制器:前者的 EPIPE 是下游正常停止,后者 则是 JSON-RPC transport 错误。

func RunContextWithDefaultBrokenPipeSignals added in v1.0.0

func RunContextWithDefaultBrokenPipeSignals(ctx context.Context, args []string, in io.Reader, out io.Writer, errOut io.Writer) int

RunContextWithDefaultBrokenPipeSignals 为二进制入口装配当前平台的默认 SIGPIPE 控制器:普通 NDJSON 输出与 MCP stdio 各自独立。嵌入式调用方若需要自定义信号 策略,应直接调用 RunContext 或 RunContextWithBrokenPipeSignals。

func RunContextWithPipelineSignal added in v0.8.0

func RunContextWithPipelineSignal(ctx context.Context, args []string, in io.Reader, out io.Writer, errOut io.Writer, enablePipelineSignal func() func()) int

RunContextWithPipelineSignal 仅由二进制入口传入 SIGPIPE 控制器。控制器会在 filter 或已解析的 --ndjson 查询命令运行期间启用,并在命令退出时恢复。

Types

This section is empty.

Directories

Path Synopsis
Package commands 提供所有 CLI command owner 共用的无状态生命周期声明。
Package commands 提供所有 CLI command owner 共用的无状态生命周期声明。
config
Package config 注册 config 命令。
Package config 注册 config 命令。
fanbox
Package fanbox 注册 FANBOX 命令组及其产品内 owner。
Package fanbox 注册 FANBOX 命令组及其产品内 owner。
fanbox/auth
Package auth owns local FANBOX authentication commands and secret prompts.
Package auth owns local FANBOX authentication commands and secret prompts.
fanbox/download
Package download owns FANBOX post asset download commands.
Package download owns FANBOX post asset download commands.
fanbox/internal/listing
Package listing owns the FANBOX shared paged-read execution and its bounded output commit semantics.
Package listing owns the FANBOX shared paged-read execution and its bounded output commit semantics.
fanbox/mcp
Package mcp owns the FANBOX stdio command route.
Package mcp owns the FANBOX stdio command route.
fanbox/post
Package post owns FANBOX content listing and post presentation commands.
Package post owns FANBOX content listing and post presentation commands.
pixiv
Package deps defines the narrow common wiring used by Pixiv data commands.
Package deps defines the narrow common wiring used by Pixiv data commands.
pixiv/auth
Package auth 注册 Pixiv auth 命令;具体 OAuth/login helper 也归本目录所有。
Package auth 注册 Pixiv auth 命令;具体 OAuth/login helper 也归本目录所有。
pixiv/auth/loginpage
Package loginpage 负责渲染 CLI 登录流程临时 HTTP 服务使用的页面。
Package loginpage 负责渲染 CLI 登录流程临时 HTTP 服务使用的页面。
pixiv/bookmark
Package bookmark owns Pixiv bookmark reads and mutations.
Package bookmark owns Pixiv bookmark reads and mutations.
pixiv/comment
Package comment owns the Pixiv comment listing command and its presenters.
Package comment owns the Pixiv comment listing command and its presenters.
pixiv/detail
Package detail owns the Pixiv entity detail command and terminal presenter.
Package detail owns the Pixiv entity detail command and terminal presenter.
pixiv/download
Package download owns the Pixiv download command and its terminal presenter.
Package download owns the Pixiv download command and its terminal presenter.
pixiv/follow
Package follow owns Pixiv follow mutations.
Package follow owns Pixiv follow mutations.
pixiv/internal/listing
Package listing owns Pixiv's shared paged-read execution and its bounded output commit semantics.
Package listing owns Pixiv's shared paged-read execution and its bounded output commit semantics.
pixiv/mcp
Package mcp 注册 Pixiv MCP 命令。
Package mcp 注册 Pixiv MCP 命令。
pixiv/mypixiv
Package mypixiv owns the authenticated `pixiv mypixiv` command group.
Package mypixiv owns the authenticated `pixiv mypixiv` command group.
pixiv/ranking
Package ranking owns the Pixiv illustration ranking command.
Package ranking owns the Pixiv illustration ranking command.
pixiv/recommended
Package recommended owns personalized Pixiv recommendation output.
Package recommended owns personalized Pixiv recommendation output.
pixiv/search
Package search owns the Pixiv artwork, novel and user search command routes.
Package search owns the Pixiv artwork, novel and user search command routes.
pixiv/series
Package series owns the Pixiv artwork and novel series listing command.
Package series owns the Pixiv artwork and novel series listing command.
pixiv/timeline
Package timeline owns the authenticated `pixiv timeline` command group.
Package timeline owns the authenticated `pixiv timeline` command group.
pixiv/user
Package user owns the Pixiv user command group.
Package user owns the Pixiv user command group.
update
Package update 注册 update 命令;更新实现仍归 internal/update。
Package update 注册 update 命令;更新实现仍归 internal/update。
Package diagnostics renders safe typed events for the CLI-owned stderr presenter.
Package diagnostics renders safe typed events for the CLI-owned stderr presenter.
Package invocation 保存一次 CLI 调用的标准流。
Package invocation 保存一次 CLI 调用的标准流。
Package pipeline owns the CLI's explicit stdin input codecs and their resolved per-command state.
Package pipeline owns the CLI's explicit stdin input codecs and their resolved per-command state.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL