golang设置默认不使用cgo进行编译

两种方法都可以

在项目中直接设置

在main.go头部写入

// +build !cgo

终端中设置全局变量

export CGO_ENABLED=0

Sitemap · Rss

津ICP备2021004480号-3