Of course!
The code can be really simple like this:
const myValueStr = "try"
const myValueInt = 12
func DoSomething() {
fmt.Println("Instruction only to put a breakpoint")
}
and the result with delve:
package main
import "fmt"
const constValueStr = "abc"
const constValueInt = 12
const constValueFloat = 1.2
var varValueStr = "def"
var varValueInt = 13
func main() {
fmt.Println(constValueStr, constValueInt, constValueFloat, varValueStr, varValueInt)
}
elvish> strings - x | grep varValue_main.varValueInt_main.varValueStrelvish> strings - x | grep constValueException: grep exited with 1[tty 156]:1:15-29: strings - x | grep constValue
elvish> dlv exec xType 'help' for list of commands.(dlv) print main.varValueInt13(dlv) print main.constValueInt12(dlv) print main.constValueFloat
Command failed: could not find symbol value for main(dlv) print main.varValueStr(unreadable could not read string at 0x100086f47 due to protocol error E08 during memory read for packet $m100086f47,3)(dlv) print main.constValueStrCommand failed: could not find symbol value for main
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c938f107-9bca-4b8e-a10c-f8deef396c87n%40googlegroups.com.