Skip to content

Instantly share code, notes, and snippets.

@dasgoll
Created June 23, 2020 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dasgoll/e88f3f0e15b749c170883414efe415f3 to your computer and use it in GitHub Desktop.
Save dasgoll/e88f3f0e15b749c170883414efe415f3 to your computer and use it in GitHub Desktop.
How to find out which Go version built your binary
% dlv exec $HOME/bin/godoc
Type 'help' for list of commands.
(dlv) b main.main
Breakpoint 1 set at 0x15596eb for main.main() ./golang.org/x/tools/cmd/godoc/main.go:156
(dlv) c
> main.main() ./golang.org/x/tools/cmd/godoc/main.go:156 (hits goroutine(1):1 total:1) (PC: 0x15596eb)
151: }
152: }
153: log.Fatalf("too many redirects")
154: }
155:
=> 156: func main() {
157: flag.Usage = usage
158: flag.Parse()
159:
160: playEnabled = *showPlayground
161:
(dlv) p runtime.buildVersion
"go1.8.1"
@dasgoll
Copy link
Author

dasgoll commented Jun 23, 2020

go version $HOME/bin/godoc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment