A Go library that formats and displays data structures in human-readable, beautifully formatted output.
ffmt is a Go library that provides enhanced formatting for displaying data structures in a human-readable way. It solves the problem of difficult-to-read default Go fmt output by offering multiple formatting options including indented structures, JSON-style output, and table views. It's specifically designed to make debugging and data inspection more intuitive for developers.
Go developers who frequently debug complex data structures or need to present data in readable formats during development and testing.
Developers choose ffmt because it provides multiple output formats in a single lightweight library, making data inspection significantly easier than Go's standard formatting. Its unique selling point is the combination of type-aware display, table formatting, and hex viewer functionality not found in standard Go packages.
Golang beautify data display for Humans
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides Puts, Print, P, and Pjson methods for various display styles, as shown in the README examples, making it versatile for different debugging needs like JSON-like and type-aware outputs.
The P method shows both data values and their types, enhancing debugging clarity by revealing underlying structures, which standard fmt lacks.
Includes a bytes viewer that displays binary data in a hex format with text representation, useful for low-level data inspection, as demonstrated in the README with formatted tables.
Converts data into aligned tables using ToTable and FmtTable, ideal for presenting structured information in CLI applications, with examples showing clean column alignment.
The Pjson method produces JSON-like output with trailing commas and unconventional formatting (e.g., commas at line starts), which may not be compatible with strict JSON parsers or API requirements.
Lacks built-in colorization for output, which could enhance readability in terminals—a feature found in other debugging libraries like go-spew or custom loggers.
Formatting large or nested data structures might introduce latency compared to the standard fmt package, as it adds extra processing for beautification and indentation.