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:
Will Beason
2021-05-19 00:52:02 -05:00
committed by GitHub
parent 37bb22c2e0
commit 3be1d08b87
1873 changed files with 295233 additions and 18679 deletions
+3 -3
View File
@@ -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) {