writeerrnoerrnowritesyscall.Writeerrerrnowrite
writeerrno
Thus, the following cases seem unclear:
errnowritewriteerrnoerrnowrite
writesyscall.Write
writewrite()
writewrittenerr
func writeAll(fd int, buffer []byte) bool {
length := len(buffer)
for length > 0 {
written, err := syscall.Write(fd, buffer)
if err != nil { // here
return false
}
length -= written
buffer = buffer[written:]
}
return true
}
Is there any wrong in my suspicion?