My friend asked me if there is anyway to avoid all track information after the program crashed, because it print hundreds of lines of track information if the program is large enough, finally we found out that we can use recover() to achieve this, and also, we found there is a approach to restart program by itself, I post here in case someone may not know yet.
func mymain() {
defer func() {
recover()
}()
......// your code that was in real main().
}
func main() {
for {
mymain()
}
}