This chapter discussed many interesting Go topics, including theoretical and practical information about the Go garbage collector; how to call C code from your Go programs; the handy and sometimes tricky defer keyword; the panic() and recover() functions; the strace(1), dtrace(1), and dtruss(1) UNIX tools; the use of the unsafe standard Go package; how to generate WebAssembly code from Go; and assembly code generated by Go. Finally, it shared information about your Go environment using the runtime package and showed how to reveal and explain the node tree of a Go program, before giving you some handy Go coding advice.
What you should remember from this chapter is that tools such as the unsafe Go package and the ability to call C code from Go are usually used on three occasions: firstly, when you want the best performance and you want to sacrifice some Go safety for it;...