August 2019
Beginner to intermediate
798 pages
17h 2m
English
Every Go package can optionally have a private function named init() that is automatically executed at the beginning of the execution time.
I will now present a code example with multiple init() functions from multiple Go packages. Examine the code of the following basic Go package, which is simply called a:
package a import ( "fmt" ) func init() { fmt.Println("init() a") } func FromA() ...Read now
Unlock full access