1
0

Better shebang for Go scripts

This commit is contained in:
Noah 2017-12-19 12:21:03 -08:00
父節點 6df07c0685
當前提交 2523888e3a
共有 2 個檔案被更改,包括 3 行新增2 行删除

查看文件

@ -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.