Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
os: ReadFile: don't check for re-allocation in the first iteration
At the beginning of the for-loop iteration cap(data) > len(data) always. Therefore, in the first iteration, this check becomes unnecessary. we can move this check to after the read operation. Change-Id: I205e4a842ced74f31124b45a39b70523b56ad840 GitHub-Last-Rev: 2fdf25dff2e9984d3a8f8e5e612ea802c88e88a1 GitHub-Pull-Request: golang/go#60473 Reviewed-on: https://go-review.googlesource.com/c/go/+/498915 Reviewed-by: Rob Pike <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Run-TryBot: Rob Pike <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]>
- Loading branch information