How to use Air with go run .
and skip the build step in Air.
#597
ADTC
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you use
go run .
, Go will build and run in a single step. The build is stored in a random temporary folder in/var
. Theoretically it's the same as usinggo build -o ./tmp/main .
then running./tmp/main
.But if you're interested in using
go run .
by itself, here's how to do it:The trick is to use
full_bin
instead ofbin
because the former is a proper shell command, while the latter is just a file reference.Note: Unfortunately this still creates an empty
tmp
directory.Beta Was this translation helpful? Give feedback.
All reactions