bradleyjkemp/memviz
GoVisualize your Go data structures using graphviz
golanggovisualizationgraphviz
주요 지표
스타 성장
스타
1.3k
포크
51
주간 성장
+0
이슈
14
6008001k1.2k
2018년 1월2019년 6월2020년 12월2022년 5월2023년 11월2025년 5월2026년 10월
아티팩트Go Modules
README
memviz

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 output that can be used to generate an easy to
understand diagram using graphviz.
To generate a diagram, first you will need to install graphviz on your system following the instructions here.
Next, use memviz.Map(out, &data) to generate a graphviz dot file and
then pipe the output into graphviz.
For examples of how to use memviz, see the code sample in the example
folder and the tests in memviz_test.go.