/structdump

simple go struct dump

Primary LanguageGoMIT LicenseMIT

Contributors Forks Stargazers Issues MIT License


StructDump

Simple go structure dumper
Explore the docs »

About The Project

StructDump takes go struct and recursively dumps all fields to standard output in "path" format.

The output format is suitable for pasting to excel sheets, documentation, or generally to any text files.

Installation

  go get github.com/encero/structdump

Usage

import "github.com/encero/structdump"

func main() {
  type SimpleType struct {
    AnInt         int
    AnString      string
    AnStringSlice []string
  }

  structdump.Dump(reflect.TypeOf(SimpleType{}))

  // Output:
  // SimpleType.AnInt int
  // SimpleType.AnString string
  // SimpleType.AnStringSlice[] string
}

For more details, please refer to the Documentation

Contributing

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.