If you’ve ever needed to inspect binary data, debug network packets, reverse-engineer file formats, or visualize in-memory structures, you know the pain of limited built-in tools. Enter — a high-performance, extensible hexdump and binary inspection library written in Go. This tutorial will take you from zero to expert, covering installation, core features, advanced use cases, and even custom formatters.
: It is designed as a tool to create partial or full database dumps, allowing developers to extract specific data via SQL queries rather than dumping an entire database. : Built in
(Golang), it leverages Go's module system for dependency management. Go Packages Typical Usage Steps Installation xdumpgo tutorial
XDumpGo Tutorial: Step-by-Step Guide to Efficient Hex and Memory Dumping in Go
Are you looking to integrate this into a specific logging framework like or Logrus ? Share public link If you’ve ever needed to inspect binary data,
package main import ( "os" "runtime/debug" ) func main() f, err := os.Create("heap.dump") if err != nil panic(err) defer f.Close() // Writes low level diagnostic information safely debug.WriteHeapDump(f.Fd()) Use code with caution. Analyzing the Memory Dump
Output:
xdumpgo dump -s csv -f example.csv -f "age > 18" -S name
xdumpgo shines when dealing with complex data. Let's look at a more intricate scenario: a struct containing pointers and nested data. : It is designed as a tool to
Now that you're acquainted with the interface, let's explore some basic xdumpgo commands:
xdumpgo is a Go library (and command-line tool) that allows developers to dump complex data structures into various formats (often XML or extended data formats). Unlike standard JSON marshaling which fails on circular references or unexported fields, xdumpgo uses reflection to provide a granular view of your data in memory.