From e9d73527a5e475a79b654c4f964b01e736bbfc12 Mon Sep 17 00:00:00 2001 From: wangbin Date: Wed, 9 Jul 2025 16:49:13 +0800 Subject: [PATCH] n --- 新建文本文档 (2).txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/新建文本文档 (2).txt b/新建文本文档 (2).txt index 57878d0..456d732 100644 --- a/新建文本文档 (2).txt +++ b/新建文本文档 (2).txt @@ -9,4 +9,14 @@ 报到门项目图标替换:(前提是已经安装MinGW环境) 1.创建文本文件app.rc 内容是要替换的图标名称(1 ICON "icon.ico"), 2.执行编译命令‌:在根目录中cmd执行windres -i app.rc -O coff -o app.syso,会生成app.syso; -3.重新打包,生成的exe就是那个图标; \ No newline at end of file +3.重新打包,生成的exe就是那个图标; + + + + var cmd *exec.Cmd + if runtime.GOOS == "windows" { + cmd = exec.Command("shutdown", "/s", "/t", "0") + } else { + cmd = exec.Command("shutdown", "-h", "now") + } + return cmd.Run() \ No newline at end of file