Skip to content

Commit

Permalink
fix linters
Browse files Browse the repository at this point in the history
  • Loading branch information
cmpxchg16 committed Oct 21, 2021
1 parent 16d7c97 commit dc87ae1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/porcelain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/providers/cloudflare_workers_kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
2 changes: 1 addition & 1 deletion pkg/providers/cloudflare_workers_kv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
Expand Down
2 changes: 1 addition & 1 deletion pkg/teller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit dc87ae1

Please sign in to comment.