I’m still learning GoLang, I now learning about functions i came through init
function, while I’m trying it a got a case when use Go build in print function it doesn’t execute first before the main
function but when i print using fmt
package it executes first
Build In Print
func init() {
println("First INIT")
}
func init() {
println("second INIT")
}
fmt package
func init() {
fmt.Println("First INIT")
}
func init() {
fmt.Println("second INIT")
}