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. Use ld.Context which is ld.Config.Context if non-nil and otherwise defaults to context.Background to avoid nil references on ld.Config.Context. Signed-off-by: Christian Stewart <christian@aperture.us>
- Loading branch information