The runtime package in Go language
What does the runtime package contain?
Package runtime contains operations that interact with Go’s runtime system, such as functions to control goroutines. It also includes the low-level type information used by the reflect package; see reflect’s documentation for the programmable interface to the run-time type system.
Code Anatomy
- In the compiler.go file, the constant variable is used to specifiy the compiler type;
- The file in the directory internal/sys tells us the runtime architecture and system information;
- The alg.go file includes various hash generation function.
- The cgocall.go file provides a way to call the c functions through go language;
- The cgo directory encompasses go compiling functionalities.