mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
Change check-lint to use golangci-lint (#3465)
golint is deprecated. The author of the code no longer supports the codebase. golangci-lint is faster than golint, and is in use by other opa repositories (e.g. Gatekeeper). This commit changes tools.go to reference golangci (so it ends up in vendor) and modifies check-lint to use golangci instead. Breaking API Changes: - plugins/rest/rest.go: Fix typo "AllowInsureTLS" -> "AllowInsecureTLS" - storage/errors.go: Removed unused IndexingNotSupportedErr Signed-off-by: Will Beason <willbeason@google.com>
This commit is contained in:
@@ -102,7 +102,8 @@ func (d *Downloader) Start(ctx context.Context) {
|
||||
go d.doStart(ctx)
|
||||
}
|
||||
|
||||
func (d *Downloader) doStart(ctx context.Context) {
|
||||
func (d *Downloader) doStart(context.Context) {
|
||||
// We'll revisit context passing/usage later.
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
d.wg.Add(1)
|
||||
@@ -112,14 +113,13 @@ func (d *Downloader) doStart(ctx context.Context) {
|
||||
cancel()
|
||||
d.wg.Wait()
|
||||
close(done)
|
||||
return
|
||||
}
|
||||
|
||||
// Stop tells the Downloader to stop downloading bundles.
|
||||
func (d *Downloader) Stop(context.Context) {
|
||||
done := make(chan struct{})
|
||||
d.stop <- done
|
||||
_ = <-done
|
||||
<-done
|
||||
}
|
||||
|
||||
func (d *Downloader) loop(ctx context.Context) {
|
||||
|
||||
Reference in New Issue
Block a user