官术网_书友最值得收藏!

  • Go Systems Programming
  • Mihalis Tsoukalos
  • 133字
  • 2021-07-02 18:08:03

Calling C code from Go

Go allows you to call C code because there are times when the only way to perform some tasks, such as communicating with a hardware device or a database server, is by using C. Nevertheless, if you find yourself using this capability many times in the same project, you might need to reconsider your approach and your choice of programming language.

Talking more about this capability in Go is beyond the scope of this book. What you should remember is that most likely, you will never need to call C code from your Go program. Nevertheless, should you wish to explore this Go feature, you can start by visiting the documentation of the cgo tool at https://golang.org/cmd/cgo/ as well as by looking at the code found at https://github.com/golang/go/blob/master/misc/cgo/gmp/gmp.go.

主站蜘蛛池模板: 常宁市| 平远县| 甘谷县| 加查县| 阿拉善左旗| 通榆县| 安西县| 浮梁县| 聂荣县| 永和县| 成武县| 曲水县| 密山市| 卢龙县| 克什克腾旗| 桐柏县| 云安县| 保康县| 昌吉市| 沙田区| 丰原市| 永登县| 芮城县| 都江堰市| 阳山县| 新蔡县| 绥化市| 聂拉木县| 敖汉旗| 扶沟县| 卢龙县| 鹤山市| 双城市| 景宁| 营山县| 宣城市| 佛学| 合作市| 千阳县| 郑州市| 弥勒县|