diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 291c7c2..e4ea0e6 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -19,7 +19,7 @@ jobs: go-version: 1.16 - uses: actions/checkout@v3 - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: version: latest args: --config=.golangci-lint.yml \ No newline at end of file diff --git a/client.go b/client.go index 8b91437..fbfd6be 100644 --- a/client.go +++ b/client.go @@ -2,7 +2,6 @@ package statsig import ( "errors" - "fmt" "net/http" "strings" "time" @@ -270,7 +269,7 @@ func (c *Client) OverrideLayer(layer string, val map[string]interface{}) { func (c *Client) LogImmediate(events []Event) (*http.Response, error) { if len(events) > 500 { err := errors.New(EventBatchSizeError) - return nil, fmt.Errorf(err.Error()) + return nil, err } events_processed := make([]interface{}, 0) for _, event := range events { diff --git a/diagnostics_test.go b/diagnostics_test.go index a81e151..af22503 100644 --- a/diagnostics_test.go +++ b/diagnostics_test.go @@ -568,5 +568,5 @@ func waitForConditionWithMessage(t *testing.T, condition func() bool, errorMsg s time.Sleep(10 * time.Millisecond) // Adjust the polling interval as needed } - t.Errorf(errorMsg) + t.Errorf("%s", errorMsg) } diff --git a/evaluation_test.go b/evaluation_test.go index cd41e0d..72c5191 100644 --- a/evaluation_test.go +++ b/evaluation_test.go @@ -109,7 +109,7 @@ func TestEvaluation(t *testing.T) { } func test_helper(apiOverride string, t *testing.T) { - t.Logf("Testing for " + apiOverride) + t.Logf("Testing for %s", apiOverride) InitializeGlobalOutputLogger(getOutputLoggerOptionsForTest(t)) c := NewClientWithOptions(secret, &Options{API: apiOverride}) var d data diff --git a/transport.go b/transport.go index 2841aed..25fd48d 100644 --- a/transport.go +++ b/transport.go @@ -235,7 +235,7 @@ func (transport *transport) doRequest( return response, false, transport.parseResponse(response, out) } - return response, retryableStatusCode(response.StatusCode), fmt.Errorf(response.Status) + return response, retryableStatusCode(response.StatusCode), fmt.Errorf("%s", response.Status) }) if err != nil {