3 ms·
Your example doesn't make sense because that's not how the syscall works.
by guappa 2y ago
Your example doesn't make sense because that's not how the syscall works.
- yencabulator 2y agoGo's Write makes a promise to not do short writes except on errors, which means it has to be a loop over write(2).
- guappa 2y agoInteresting. Does it return both the amount of partially written data AND the error if it fails?
- yencabulator 2y agoYes. https://pkg.go.dev/io#Writer https://pkg.go.dev/io#Writer