bogon:~ lhl$ cat helloworld.go
package main
import "fmt"
func test(){
fmt.Println("this is test")
}
func init(){
fmt.Println("this is init")
}
func main(){
fmt.Println("this is main")
test()
}
bogon:~ lhl$ go run helloworld.go
this is init
this is main
this is test
bogon:~ lhl$