Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
github.com/2yanyi/closecmdpopup
📦 #mod# 关闭 CMD 弹窗,适用于 Go 制作的 exe 程序。
写一个简单的 Windows 测试窗口程序,这里使用 dlgs 库用于简单演示。
package main
import (
"github.com/gen2brain/dlgs"
// 添加这一行代码就可以实现关闭 CMD 窗口
_ "github.com/matsuwin/closecmdpopup"
)
func main() {
_, _ = dlgs.Info("golang", "Hello Windows Program")
}
前后效果截图
要禁用 Windows 的 CDM 窗口还有一种方法,就是在编译时添加一些条件。
go build -ldflags "-H windowsgui"
看起来挺不错的,但是要注意!第二种方案的本质的是让进程后台运行了。
你需要结合实际的应用场景做出选择。
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.