Better shebang for Go scripts
This commit is contained in:
父節點
6df07c0685
當前提交
2523888e3a
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env gosh
|
||||
///bin/true && exec /usr/bin/env gosh "$0" "$@"
|
||||
// vim:set ft=go:
|
||||
package main
|
||||
|
||||
// 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.
|
||||
temp = tempfile.NamedTemporaryFile(delete=False, suffix=".go")
|
||||
temp.write(fh.read().strip())
|
||||
temp.write(fh.read().strip().encode())
|
||||
temp.close()
|
||||
|
||||
# Call it.
|
||||
|
|
載入中…
新增問題並參考
Block a user