Documentation
¶
Index ¶
- func ExploreJSON(title string, json gjson.Result) error
- func ExploreJSONStream[T any](title string, it Iterator[T]) error
- func RenderJSON(title string, json gjson.Result) string
- func SanitizeTerminalString(s string) string
- func WriteTerminalText(dst io.Writer, src io.Reader) error
- type AnyIterator
- type Iterator
- type JSONView
- type JSONViewer
- type TableView
- type TextView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExploreJSON ¶
ExploreJSON explores a single JSON value known ahead of time
func ExploreJSONStream ¶
ExploreJSONStream explores JSON data loaded incrementally via an iterator
func SanitizeTerminalString ¶ added in v1.9.0
SanitizeTerminalString escapes control characters that terminals can interpret.
func WriteTerminalText ¶ added in v1.18.1
WriteTerminalText streams untrusted text with terminal controls escaped, keeping newlines and tabs for readable layout. Malformed UTF-8 becomes replacement characters, as in SanitizeTerminalString. It is only for terminal presentation; files, pipes, and explicitly requested raw output must retain their original bytes.
Types ¶
type AnyIterator ¶
An iterator over `any` values
type Iterator ¶
A generic iterator interface that is used by the `genericIterator` struct below to convert iterators over specific types to an AnyIterator
type JSONViewer ¶
type JSONViewer struct {
// contains filtered or unexported fields
}
func (*JSONViewer) Init ¶
func (v *JSONViewer) Init() tea.Cmd
func (*JSONViewer) View ¶
func (v *JSONViewer) View() string