memviz

package module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2019 License: MIT Imports: 6 Imported by: 5

README

memviz Build Status Coverage Status Go Report Card GoDoc

How would you rather debug a data structure?

"Pretty" printed Visual graph
(*test.fib)(0xc04204a5a0)({
 index: (int) 5,
 prev: (*test.fib)(0xc04204a580)({
  index: (int) 4,
  prev: (*test.fib)(0xc04204a560)({
   index: (int) 3,
   prev: (*test.fib)(0xc04204a540)({
    index: (int) 2,
    prev: (*test.fib)(0xc04204a520)({
     index: (int) 1,
     prev: (*test.fib)(0xc04204a500)({
      index: (int) 0,
      prev: (*test.fib)(),
      prevprev: (*test.fib)()
     }),
     prevprev: (*test.fib)()
    }),
    prevprev: (*test.fib)(0xc04204a500)({
     index: (int) 0,
     prev: (*test.fib)(),
     prevprev: (*test.fib)()
    })
   }),
   .
   .
   .

Usage

memviz takes a pointer to an arbitrary data structure and generates an easy to understand graph.

Simply pass in your data structure like so: memviz.Map(out, &data) and then pipe the output into graphviz.

For more complete examples see the tests in memviz_test.go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map(w io.Writer, is ...interface{})

Map prints out a Graphviz digraph of the given datastructure to the given io.Writer

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL