Documentation
¶
Index ¶
- func Bold(txt string) string
- func BoxCodeItem(item string) string
- func BoxDetailItem(item string) string
- func BoxErrorFooter() string
- func BoxErrorItem(item string) string
- func BoxHeader(icon, title string) string
- func BoxInfoItem(item string) string
- func BoxItem(item string) string
- func BoxSuccessFooter() string
- func CheckMark() string
- func CrossMark() string
- func Cyan(txt string) string
- func DimCheckMark() string
- func DimCyan(txt string) string
- func DisplayJSONBox(title string, payload []byte) error
- func DisplayLogo(version string, toolVersion []string)
- func Green(txt string) string
- func IsRenderedError(err error) bool
- func JSONBoxLines(title string, payload []byte) ([]string, error)
- func MarkRenderedError(err error) error
- func NormalizeErrorLines(text string) []string
- func Red(txt string) string
- func Yellow(txt string) string
- type RenderedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoxCodeItem ¶
BoxCodeItem creates a box line for code-like content.
func BoxInfoItem ¶
BoxInfoItem creates a neutral informational box item.
func DisplayJSONBox ¶
DisplayJSONBox prints a formatted JSON box to stdout.
func DisplayLogo ¶
DisplayLogo 显示pzero的logo和版本信息
func IsRenderedError ¶
IsRenderedError reports whether the error has already been rendered.
func JSONBoxLines ¶
JSONBoxLines renders JSON content as box lines with light syntax highlighting.
func MarkRenderedError ¶
MarkRenderedError wraps an error so the root command won't print it again.
func NormalizeErrorLines ¶
NormalizeErrorLines converts free-form error output into unique display lines.
Types ¶
type RenderedError ¶
type RenderedError struct {
Err error
}
RenderedError marks an error as already rendered in the console UI.
func (*RenderedError) Error ¶
func (e *RenderedError) Error() string
func (*RenderedError) Unwrap ¶
func (e *RenderedError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.