If the defer delayed processing function in golang has an err return value, how to deal with it?
123456789101112131415 package main import ( “fmt” ” os” ) func main() { file, err := os.Open(“./src/ main/test.txt”) if err != nil { fmt.Println(“open error “, err) } defer file.Close() fmt.Println(file) } defer file.Close() will have a gray prompt in goland, saying Unhandled error. An error may occur during close. How should I deal with this error?