Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDuration ¶
FormatDuration formats seconds into human-readable duration (e.g., "2m 30s", "1h 15m").
func FormatDurationFloat ¶
FormatDurationFloat formats float64 seconds into human-readable duration.
func FormatTime ¶
func FormatTime(ts instant) string
FormatTime formats an instant as local wall-clock time, or "-" when unset.
Types ¶
type Format ¶ added in v1.3.1
type Format int
Format selects how command output is serialized.
const ( // FormatTable renders human-readable aligned columns (the default). FormatTable Format = iota // FormatJSON renders pretty-printed JSON. FormatJSON // FormatTOON renders Token-Oriented Object Notation — a compact // serialization that drops the per-row repeated keys JSON emits for // uniform arrays, materially reducing token count for list output. FormatTOON )
func (Format) Structured ¶ added in v1.3.1
Structured reports whether the format is a machine-readable dump (JSON or TOON) rather than the human table view. Table footers, detail views, and interactive prompts are suppressed when the output is structured.
type JSONPrinter ¶
type JSONPrinter struct {
// contains filtered or unexported fields
}
JSONPrinter prints data as pretty-printed JSON.
type TOONPrinter ¶ added in v1.3.1
type TOONPrinter struct {
// contains filtered or unexported fields
}
TOONPrinter prints data as TOON (Token-Oriented Object Notation). It routes through sdk.Marshal so the encoding stays identical to the Flashduty MCP server's `--output-format toon` path — one source of truth for how Flashduty serializes TOON.
type TablePrinter ¶
type TablePrinter struct {
// contains filtered or unexported fields
}
TablePrinter prints data as aligned tables.