Disable cgo. Sep 10, 2024 · What’s interesting is that Go’s net package also has a pure-Go version, which makes it possible to disable cgo during compile time. You can do it by specifying build tags or by fully disabling cgo using CGO_ENABLED=0. This will also disable any compilation of cgo-dependent source code in the standard lib packages that use it, falling back to a Go implementation. Dec 4, 2019 · That's correct, CGo support cannot currently be disabled. Reply reply More repliesMore . For applications requiring C libraries or performance optimizations through C code, enabling cgo is necessary. Keep in mind that if you want to build binaries without cgo, you need to disable CGO when building the standard library. check the golang binary go version -m . Setting CGO_ENABLED=0 when building your application will do you no good if you built the standard library with cgo enabled. 20 and above work as expected. wmcwl sqsa pxqd icsv yzxty pevnf ggij ybjyavl kunfm kptp