Documentation
¶
Overview ¶
Package render 负责响应的格式化输出, 对照 ant 的 --format / --transform / --raw-output。
支持格式: auto, json, jsonl, yaml, pretty, raw, explore。 (explore 在本实现里等价于 pretty —— 不内嵌 TUI, 但语义保留: 人看的缩进输出。)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
Format string // auto/json/jsonl/yaml/pretty/raw/explore
Transform string // GJSON 路径, 空则不变换
RawOutput bool // 字符串结果去掉 JSON 引号 (jq -r 语义)
// ListPath 非空时, 表示这是一个 list 端点, 对该路径下数组的每个元素逐个变换/输出,
// 与 ant "transform 作用于每个 item 而非信封" 的行为一致。
ListPath string
}
Options 控制一次渲染。
Click to show internal directories.
Click to hide internal directories.