invocation

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 1 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

Overview

Package invocation 保存 CLI 根命令的调用期数据:persistent flags 目标与标准流。

只保存调用方提供的值,不包装、缓存或替换 IO,不含服务方法;不导入 config、auth、 SDK、Cobra 或 update。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RootOptions

type RootOptions struct {
	Proxy string
	Host  string
}

RootOptions 是根命令 persistent flags 的目标。

type Streams

type Streams struct {
	In  io.Reader
	Out io.Writer
	Err io.Writer

	// InIsTerminal 标记 stdin 是否为交互终端;由根命令入口探测,测试可显式设置。
	// 非 TTY stdin 是管道/批处理输入的信号,命令据此选择输入分类。
	InIsTerminal bool

	// OutIsTerminal 标记 stdout 是否为交互终端;由根命令入口探测,测试可显式
	// 设置。非 TTY stdout 时默认输出稳定记录流(一行一个 ref/URI),TTY 时
	// 使用人类文本渲染。显式 --json/--ndjson 不受此标记影响。
	OutIsTerminal bool
}

Streams 保存调用方提供的标准输入、标准输出和错误输出。

func NewStreams

func NewStreams(in io.Reader, out, err io.Writer) *Streams

NewStreams 构造 Streams。

Jump to

Keyboard shortcuts

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