What is the difference between 2 code blocks
package main import ( "fmt" "github.com/sirupsen/logrus" "runtime/debug" "time" ) func main () { defer func () { if err := recover (); err != nil { logrus . Errorln ( "main" , err ) debug . PrintStack () } }() GoInside ( nil ) time . Sleep ( 2 * time . Second ) fmt . Println ( "After panic" ) } type Test struct { X int } func GoInside ( v * Test ) { go NullPointer ( v . X ) } func NullPointer ( X int ) { fmt . Println ( X ) } This above code can handle a panic error , but the code below can not handle a panic ==> why package main import ( "fmt" "github.com/sirupsen/logrus" "runtime/debug" "time" ) func main () { defer func () { if err := recover (); err != nil { logrus . Errorln ( "main" , err ) debug . PrintStack () } }() GoInside () time . Sleep ( 2 * ti...