Discover Packages
github.com/golango-cn/dbm-cli
internal
cli
output
package
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Aug 20, 2026
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package output 实现查询结果的多种格式化输出。
支持格式:table(默认对齐表格)、json、csv、yaml、vertical(\G 风格,每行一记录)。
输入统一为 driver.Result,与具体数据库解耦。
Format 是输出格式枚举。
const (
FormatTable Format = "table"
FormatJSON Format = "json"
FormatCSV Format = "csv"
FormatYAML Format = "yaml"
FormatVertical Format = "vertical"
)
ParseFormat 把字符串转为 Format,非法值回退到 table。
type Options struct {
Format Format
}
Options 控制输出行为。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.