Граф коммитов

2 Коммитов

Автор SHA1 Сообщение Дата
Julie Qiu 2a4e864814 internal/xcontent: fix staticcheck error SA1029
Fix staticcheck error:

	should not use built-in type string as key for value; define
	your own type to avoid collisions (SA1029)

Change-Id: I3f52e988113b51cef990fe0d4c86366010689b8f
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/720886
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-04-17 18:18:54 +00:00
Jonathan Amsterdam f6468b9e99 internal/xcontext,worker: detach context for fetch
Introduce internal/xcontext, which provides a way to "detach"
a context from its parent's timeout and cancellation signals.
(Copied from golang.org/x/tools.)

Use it when the worker does a fetch, to prevent the fetch
from being canceled while retaining the parent context's values.

Change-Id: I91fd7a5790b5654983ee72d8054fb74c45f9b417
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/720905
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-04-17 13:39:19 +00:00