Skip to content

Commit

Permalink
Fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinadhruve10 committed Nov 10, 2023
1 parent 7491ee1 commit e41ca1a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions sysdig/resource_sysdig_secure_cloud_auth_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,16 @@ func getEncodedServiceAccountKey(resourceName string, accountID string) string {
UniverseDomain: "googleapis.com",
}

test_service_account_key_bytes, _ := json.Marshal(test_service_account_key)
test_service_account_key_bytes, err := json.Marshal(test_service_account_key)
if err != nil {
fmt.Errorf("Failed to marshal test_service_account_key: %v", err)

Check failure on line 143 in sysdig/resource_sysdig_secure_cloud_auth_account_test.go

View workflow job for this annotation

GitHub Actions / Test / Lint

unusedresult: result of fmt.Errorf call not used (govet)
}

var out bytes.Buffer
json.Indent(&out, test_service_account_key_bytes, "", " ")
err = json.Indent(&out, test_service_account_key_bytes, "", " ")
if err != nil {
fmt.Errorf("Failed to indent test_service_account_key: %v", err)

Check failure on line 149 in sysdig/resource_sysdig_secure_cloud_auth_account_test.go

View workflow job for this annotation

GitHub Actions / Test / Lint

unusedresult: result of fmt.Errorf call not used (govet)
}
out.WriteByte('\n')

test_service_account_key_encoded := b64.StdEncoding.EncodeToString(out.Bytes())
Expand Down

0 comments on commit e41ca1a

Please sign in to comment.