Khi tôi đang đọc: http://golang.org/doc/effective_go.html#errorsLỗi (. Os.PathError) trong Go là gì?
tôi thấy dòng như: err.(*os.PathError)
trong bối cảnh này:
for try := 0; try < 2; try++ {
file, err = os.Create(filename)
if err == nil {
return
}
if e, ok := err.(*os.PathError); ok && e.Err == syscall.ENOSPC {
deleteTempFiles() // Recover some space.
continue
}
return }
gì chính xác là err.(*os.PathError)
tại Gò?