How to Die Dump in Go - dd()
Having come from the PHP community, we often have a handy debug function at our disposal dd() (part of Laravel) and var_dump() (native). This may not be perfect (compared with a full on debugging suite) but it is a quick and easy debugging method. This post gives an idea on how you can do the same, but in Go.
We’re helped out by being able to use both variable parameters (shown with ...) and the interface type to handle different types, both strings and integers in our examples.