Skip to content

Commit

Permalink
Publish gosdk from 7034368dd8d (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
maratori authored Nov 20, 2024
1 parent c4c168f commit 9a0b05e
Show file tree
Hide file tree
Showing 148 changed files with 3,531 additions and 11,802 deletions.
24 changes: 7 additions & 17 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ linters-settings:
# Default: true
strconcat: false

reassign:
# Patterns for global variable names that are checked for reassignment.
# See https://github.com/curioswitch/go-reassign#usage
# Default: ["EOF", "Err.*"]
patterns:
- ".*"

rowserrcheck:
# database/sql is always checked
# Default: []
Expand Down Expand Up @@ -353,14 +360,6 @@ issues:
- wrapcheck

## specific to gosdk
- path: "^services"
linters:
- dupl
- errcheck
- gochecknoinits
- goconst
- goimports
- lll
- path: "^fieldmask"
linters:
- nestif
Expand All @@ -370,19 +369,10 @@ issues:
- path: "^example_test.go$"
linters:
- testableexamples
- path: "^services"
text: "method \\S+Id should be \\S+ID"
- path: "^services"
source: 'const TokenExchangeServiceID conn.ServiceID = "nebius.iam.v1.TokenExchangeService"'
- path: "^services"
text: "SA1019: .+ is deprecated"
- path: "operations/alphaops"
text: "SA1019: .+ is deprecated"
- path: "serviceerror"
text: "the error type name .+ should conform to the `XxxError` format"
- path: "serviceerror"
linters:
- protogetter # TODO: fix
- path: "fieldmask"
linters:
- nilnil # TODO: fix or ignore
Expand Down
2 changes: 1 addition & 1 deletion auth/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (c *CachedServiceTokener) Run(ctx context.Context) error { //nolint:gocogni
retry = c.initialRetry
} else {
mul := math.Pow(c.retryMultiplier, float64(retryCount))
retry = time.Duration(math.Max(float64(c.maxRetry), float64(c.initialRetry)*mul))
retry = time.Duration(math.Min(float64(c.maxRetry), float64(c.initialRetry)*mul))
}
c.logger.ErrorContext(
ctx,
Expand Down
2 changes: 1 addition & 1 deletion conn/resolvers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/nebius/gosdk/conn"
)

//nolint:paralleltest,tparallel // tests operate with the global state
//nolint:paralleltest,tparallel,reassign // tests operate with the global state
func TestConventionResolver_positive(t *testing.T) {
t.Parallel()
tests := []struct {
Expand Down
Loading

0 comments on commit 9a0b05e

Please sign in to comment.