Printf
or Println
and other print function variants to print the variable to what’s the valuePrintf
we can have format specifiers to format the variables especially complex ones
%v
: will only print values without keys%+v
: will print values with keys%#v
: will print variable type along with keys in variable, it’s more verbose than #+v
format specifier%T
: will represent the type of the variabledelve
go install github.com/go-delve/delve/cmd/dlv@latest
dlv version
$GOPATH/bin
is not in your $PATH
delve
dlv debug GO_PROGRAM_ENTRY_FILE_PATH GO_PROGRAM_PARAMETERS_IF_ANY