package mainimport ("fmt""time")func panic_test(){defer func() { fmt.Println("no")// if e := recover(); e != nil {// fmt.Println("some wrong:", e)// }}()z := 0zero := 1/zfmt.Println(zero)}func main() {panic_test()go func() { for a := range time.Tick(1e9) { fmt.Printf("cur conn num: %v\n", a) }}()list := []string{"a","b","c","d"}//fmt.Printf("in main, list addr is %p \r\n", list)go func( list []string) { //fmt.Printf("in goruotine, list addr is %p \r\n", list) time.Sleep(1e9) (list)[2] = "CC" list = append(list,"FF") for i, c := range list{ fmt.Println( "in go", i, c) }}(list)for i, c := range list{ fmt.Println( i, c) time.Sleep(1e9)}fmt.Println( "second printf")for i, c := range list{ fmt.Println( i, c) //time.Sleep(1e9)}for{time.Sleep(1e5)}}