Kiedy czytałem: http://golang.org/doc/effective_go.html#errorsCo to jest err. (* Os.PathError) w Go?
znalazłem taką linię: err.(*os.PathError)
w tym kontekście:
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 }
co dokładnie jest err.(*os.PathError)
w Go?