3 ms·
Go's Write makes a promise to not do short writes except on errors, which means it has to be a loop over write(2).
by yencabulator 2y ago
Go'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