From b71516a0da198c271e7d4efc695dfbd82596e607 Mon Sep 17 00:00:00 2001 From: nick Date: Wed, 21 Apr 2021 15:03:11 +0800 Subject: [PATCH] =?UTF-8?q?go=E5=8E=8B=E7=BC=A9=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- other.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/other.md b/other.md index acf62ea..181c3ef 100644 --- a/other.md +++ b/other.md @@ -333,4 +333,10 @@ timeout 3s php ./index.php #执行脚本,超过 3s 强制关掉进程 补充:时间单位有 s 秒 m 分钟 h 小时 d 天,默认为秒,没有超时返回 0 ,超时返回 124 +#### Golang 压缩编译 +``` +go build -ldflags="-s -w" -o server main.go && upx -9 server +``` + +需要先安装 upx 工具