Let's Learn Go -- (4) Common Functions
· β 3 min read
1. The main and init Functions A package can contain multiple init functions, but it must contain exactly one main function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 package main import ( "fmt" ) func init() { fmt.