Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/packages: correctly handle context canceled
If the context is canceled for packages.Load, the following log message is written numerous times to stderr and returned as a load error per-package: internal error: error "context canceled" (*errors.errorString) without position Check if the context was canceled and return nil, ctx.Err() instead. ld.Config.Context is equivalent to ld.Context as Config is an embedded struct within loader. Use ld.Context to refer to ld.Config.Context (for consistency). Signed-off-by: Christian Stewart <christian@aperture.us>
- Loading branch information
Showing
1 changed file
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters