當我閱讀時:http : //golang.org/doc/effective_go.html#errors我發(fā)現(xiàn)這樣的行:err.(*os.PathError)在這種情況下: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 }err.(*os.PathError)Go到底是什么?
- 2 回答
- 0 關(guān)注
- 420 瀏覽
添加回答
舉報
0/150
提交
取消