Skip to content

Commit

Permalink
no lint lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkruger committed Dec 16, 2024
1 parent 1035cae commit 511460a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/ld/ld.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ func IsTransient(err error) bool {
// Fallback to default backoff if header can't be parsed
// https://apidocs.launchdarkly.com/#section/Overview/Rate-limiting
// Method is curried in order to avoid stubbing the time package and fallback Backoff in unit tests
func RateLimitBackoff(now func() time.Time, fallbackBackoff h.Backoff) func(minDuration, max time.Duration, attemptNum int, resp *http.Response) time.Duration {
return func(minDuration, max time.Duration, attemptNum int, resp *http.Response) time.Duration {
func RateLimitBackoff(now func() time.Time, fallbackBackoff h.Backoff) func(minDuration, max time.Duration, attemptNum int, resp *http.Response) time.Duration { //nolint:predeclared
return func(minDuration, max time.Duration, attemptNum int, resp *http.Response) time.Duration { //nolint:predeclared
if resp != nil {
if resp.StatusCode == http.StatusTooManyRequests {
if s, ok := resp.Header["X-Ratelimit-Reset"]; ok {
Expand Down Expand Up @@ -193,7 +193,7 @@ func (c ApiClient) getProjectEnvironment(projKey string) (*ldapi.Environment, er
}

func (c ApiClient) getFlags(projKey string, params url.Values) ([]ldapi.FeatureFlag, error) {
url := c.getPath("/flags/" + projKey)
url := c.getPath(fmt.Sprintf("/flags/%s", projKey))

Check failure on line 196 in internal/ld/ld.go

View workflow job for this annotation

GitHub Actions / go-tests

fmt.Sprintf can be replaced with string concatenation (perfsprint)
req, err := h.NewRequest(http.MethodGet, url, nil)
if err != nil {
return nil, err
Expand Down

0 comments on commit 511460a

Please sign in to comment.