Better shebang for Go scripts
This commit is contained in:
parent
6df07c0685
commit
2523888e3a
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env gosh
|
///bin/true && exec /usr/bin/env gosh "$0" "$@"
|
||||||
|
// vim:set ft=go:
|
||||||
package main
|
package main
|
||||||
|
|
||||||
// SimpleHTTPServer is a simple Go static file server, similar to the Python
|
// SimpleHTTPServer is a simple Go static file server, similar to the Python
|
||||||
|
|
|
@ -39,7 +39,7 @@ def main():
|
||||||
|
|
||||||
# Write it to a temp file, sans shebang.
|
# Write it to a temp file, sans shebang.
|
||||||
temp = tempfile.NamedTemporaryFile(delete=False, suffix=".go")
|
temp = tempfile.NamedTemporaryFile(delete=False, suffix=".go")
|
||||||
temp.write(fh.read().strip())
|
temp.write(fh.read().strip().encode())
|
||||||
temp.close()
|
temp.close()
|
||||||
|
|
||||||
# Call it.
|
# Call it.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user