4 ms·
"Go doesn’t suppose the use of a #! on the starting line, which means you can’t just use uncompiled files as utility scripts." So the author wants to type "./f
by voidlogic 14y ago
"Go doesn’t suppose the use of a #! on the starting line, which means you can’t just use uncompiled files as utility scripts."
So the author wants to type "./foo.go" rather than "go run"? Why not just build your executable, "go build", then you can run/move the resulting executable ./foo.
This really doesn't seem like a big deal / why do I want to compile a utility program every-time I run it?
- Evbn 14y agoGo run compiled as often each #!python. The runner can cache whatever it wants. But someone could write shebang-go wrapper to implement this functionality, but a modification to Unix would be needed, since shebang is a magic hack on the '#' character, not configurable,IIRC
- orangethirty 14y agoMaybe for distribution purposes?