Skip to content

oslyak/htmldump

Repository files navigation

HTML dump

The htmldump package is a Go tool for developers, designed to simplify the visualization of Go data structures by converting them into HTML tables. This functionality is particularly useful during development and debugging, as it provides a clear and organized view of complex data.

Supported Data Types

The htmldump package supports a wide range of Go data types, including:

  • Structs (including nested structs, as demonstrated in the pack example)
  • Slices
  • Maps
  • Basic types (e.g., strings, integers, floats)

By leveraging the htmldump package, developers can quickly inspect and analyze their data in a user-friendly format, enhancing productivity and reducing debugging time.

Example

The example/example.go file provides a complete example of how to use the htmldump package. It includes:

How to Run

  1. Clone the repository:

    git clone https://github.com/oslyak/htmldump.git
    cd htmldump
  2. Install dependencies:

    go mod tidy
  3. Run the example:

    go run example/example.go
  4. The generated HTML file (example.html) will open in your default browser.

How to install

  1. Add to your project:
    go get github.com/oslyak/htmldump@v1.0.0

Dependencies

  • gofakeit: Used for generating random data.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

The `htmldump` package is a tool for developers, designed to simplify the visualization of Go data structures by converting them into HTML tables.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors