Debugging in Go is currently flaky as Delve fails to get the proper objects.

http://liza.io/are-you-experiencing-shady-output-from-your-go-debugger-try-these-things/

!!! Tools

There are several tools to help though.

!! Spew

https://github.com/davecgh/go-spew

Add this import line to the file you're working in:

%%prettify 
{{{
import "github.com/davecgh/go-spew/spew"
}}}
/%

To dump a variable with full newlines, indentation, type, and pointer information use Dump, Fdump, or Sdump:

%%prettify 
{{{
spew.Dump(myVar1, myVar2, ...)
spew.Fdump(someWriter, myVar1, myVar2, ...)
str := spew.Sdump(myVar1, myVar2, ...)
}}}
/%

----
[CategoryComputing.Lang.Go]