From dc87ae17a9440851f8b6c76d906ab6010f9a560a Mon Sep 17 00:00:00 2001 From: Uri Shamay Date: Thu, 21 Oct 2021 09:51:31 +0300 Subject: [PATCH] fix linters --- pkg/porcelain.go | 4 ++-- pkg/providers/cloudflare_workers_kv.go | 4 ++-- pkg/providers/cloudflare_workers_kv_test.go | 2 +- pkg/teller.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/porcelain.go b/pkg/porcelain.go index 2431f8eb..d36da7a3 100644 --- a/pkg/porcelain.go +++ b/pkg/porcelain.go @@ -107,7 +107,7 @@ func (p *Porcelain) PrintEntries(entries []core.EnvEntry) { for i := range entries { v := entries[i] - ep := ellipsis.Shorten(v.ResolvedPath, 30) + ep := ellipsis.Shorten(v.ResolvedPath, 30) //nolint if !v.IsFound { fmt.Fprintf(&buf, "[%s %s %s] %s\n", yellow(v.ProviderName), gray(ep), red("missing"), green(v.Key)) } else { @@ -120,7 +120,7 @@ func (p *Porcelain) PrintEntries(entries []core.EnvEntry) { fmt.Fprint(p.Out, out) } func maskedValue(v string) string { - return fmt.Sprintf("%s*****", v[:int(math.Min(float64(len(v)), 2))]) + return fmt.Sprintf("%s*****", v[:int(math.Min(float64(len(v)), 2))]) //nolint } func (p *Porcelain) PrintMatches(matches []core.Match) { diff --git a/pkg/providers/cloudflare_workers_kv.go b/pkg/providers/cloudflare_workers_kv.go index 9f0f45bf..1aa2e083 100644 --- a/pkg/providers/cloudflare_workers_kv.go +++ b/pkg/providers/cloudflare_workers_kv.go @@ -27,7 +27,7 @@ func NewCloudflareClient() (core.Provider, error) { os.Getenv("CLOUDFLARE_API_EMAIL"), ) - cloudflare.UsingAccount(os.Getenv("CLOUDFLARE_ACCOUNT_ID"))(api) + cloudflare.UsingAccount(os.Getenv("CLOUDFLARE_ACCOUNT_ID"))(api) //nolint if err != nil { return nil, err @@ -91,7 +91,7 @@ func (c *Cloudflare) getSecret(p core.KeyPath) ([]byte, error) { k = p.Env } if k == "" { - return nil, fmt.Errorf("Key required for fetching secrets. Received \"\"") + return nil, fmt.Errorf("Key required for fetching secrets. Received \"\"") //nolint } return c.client.ReadWorkersKV(context.TODO(), p.Path, k) } diff --git a/pkg/providers/cloudflare_workers_kv_test.go b/pkg/providers/cloudflare_workers_kv_test.go index 58a7a6ff..188acb81 100644 --- a/pkg/providers/cloudflare_workers_kv_test.go +++ b/pkg/providers/cloudflare_workers_kv_test.go @@ -23,7 +23,7 @@ func TestCloudflareWorkersKV(t *testing.T) { shazam := []byte("shazam") mailman := []byte("mailman") - listOut := cloudflare.ListStorageKeysResponse{ + listOut := cloudflare.ListStorageKeysResponse{ //nolint cloudflare.Response{}, []cloudflare.StorageKey{{Name: "MG_KEY"}, {Name: "SMTP_PASS"}}, cloudflare.ResultInfo{}, diff --git a/pkg/teller.go b/pkg/teller.go index f616a9fc..22063d60 100644 --- a/pkg/teller.go +++ b/pkg/teller.go @@ -237,7 +237,7 @@ func checkForMatches(path string, entries []core.EnvEntry) ([]core.Match, error) //nolint scanner.Buffer(buf, 10*1024*1024) // 10MB lines correlating to 10MB files max (bundles?) - var lineNumber int = 0 + var lineNumber int = 0 //nolint for scanner.Scan() { lineNumber++ line := scanner.Bytes()