internal,proxy, all: replace proxy.DefaultClient with NewDefaultClient()
Instead of exposing a global public variable, require that users of the
proxy package instantiate their own proxy client. This makes the package
harder to misuse, and makes it clearer where we are using a real client
vs. a test client.
Change-Id: I2f0f5895065e6efec1d50b3ac34cb04847e3b002
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/524457
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/all_test.go b/all_test.go
index ba42de8..371278a 100644
--- a/all_test.go
+++ b/all_test.go
@@ -77,7 +77,7 @@
return r.LintOffline()
}
} else {
- pc := proxy.DefaultClient
+ pc := proxy.NewDefaultClient()
lint = func(r *report.Report) []string {
return r.Lint(pc)
}