Run go packages without compiling

794 views
Skip to first unread message

jkl...@ucdavis.edu

unread,
Jul 18, 2017, 3:52:46 PM7/18/17
to golang-nuts
If I've already compiled my golang package, I'll have files in my /bin/ and /pkg/linux_amd64 folders. Is there a way I can run the compiled binary without have to compile the code first (go run) ?

Ian Lance Taylor

unread,
Jul 18, 2017, 4:14:54 PM7/18/17
to Joanna .Leong, golang-nuts
Sorry, I don't understand what you asking for.

You can do this:

go build -o x x.go

and then run `./x`.

Ian

jkl...@ucdavis.edu

unread,
Jul 18, 2017, 6:58:53 PM7/18/17
to golang-nuts, jkl...@ucdavis.edu
Thanks this is what I was looking for
Reply all
Reply to author
Forward
0 new messages