You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to delve-dev
Is it possible to specify to dlv to use an alternate version of Go other than the default one found in $PATH?
I need to use go1.11 for a specific project, so followed this guide (https://golang.org/doc/install#extra_versions) to get go1.11 installed alongside go1.12. As go1.12 is the default though, dlv debug uses it to build the binary instead. Is it possible to override this?
Thanks
Vinoth Ramiah
unread,
Aug 30, 2019, 11:43:05 AM8/30/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Alessandro Arzilli, delve-dev
Thanks for getting back to me Alessandro.
Figured out that I can set GOROOT to the directory where the alternate go version is located (~/sdk/go1.11.5), and making sure PATH includes ~/sdk/go1.11.5/bin before the standard go bin path. Delve then uses it to debug instead of default go binary. Bit clunky but it works 👍
Alessandro Arzilli
unread,
Aug 30, 2019, 7:39:23 PM8/30/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Vinoth Ramiah, delve-dev
We don't have an option for that but you can pass -gcflags='all=-N
-l' to 'go build' and then debug the resulting executable with
'dlv exec'