Skip to content

Commit

Permalink
Fix lint errors (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenny-statsig authored Aug 20, 2024
1 parent a85cc88 commit 3ad0fae
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package statsig

import (
"errors"
"fmt"
"net/http"
"strings"
"time"
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion diagnostics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
2 changes: 1 addition & 1 deletion evaluation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3ad0fae

Please sign in to comment.