Skip to main content


Using Go's runtime/cgo to pass values between C and Go

·6 mins
Calling C code from Go (or Go code from C) presents certain challenges, especially when Go values need to be used by C. This article discusses the runtime/cgo package added in Go 1.17 and how it can be used to solve these challenges.