why i can't call init
function from the other function, init()
is just function right, why i can't just call the init
function, should i change golang RFC to make it happend
package main
import (
"fmt"
)
func init() {
fmt.Println("Hello, playground")
}
func main() {
go init()
fmt.Println("Hello, playground")
}
error :
./prog.go:12:8: undefined: init