Skip to content

Commit

Permalink
style: format code with Gofumpt and Prettier
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in 3266b44 according to the output
from Gofumpt and Prettier.

Details: #2579
  • Loading branch information
deepsource-autofix[bot] authored Aug 14, 2024
1 parent 3266b44 commit 92ea4ec
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
9 changes: 4 additions & 5 deletions hack/cspell/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
)

type CspellConfig struct {
Import []string `json:"import,omitempty"`
IgnorePaths []string `json:"ignorePaths,omitempty"`
IgnoreWords []string `json:"ignoreWords,omitempty"`
Import []string `json:"import,omitempty"`
IgnorePaths []string `json:"ignorePaths,omitempty"`
IgnoreWords []string `json:"ignoreWords,omitempty"`
Overrides []Override `json:"overrides,omitempty"`
Patterns []Pattern `json:"patterns,omitempty"`
Patterns []Pattern `json:"patterns,omitempty"`
}

type Override struct {
Expand Down Expand Up @@ -293,4 +293,3 @@ func unique(strings []string) []string {
sort.Strings(result) // アルファベット順にソート
return result
}

2 changes: 1 addition & 1 deletion internal/circuitbreaker/breaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type breaker struct {
minSamples int64
openTimeout time.Duration
openExp int64 // unix time
closedRefreshTimeout time.Duration
closedRefreshTimeout time.Duration
closedRefreshExp int64 // unix time
}

Expand Down
12 changes: 6 additions & 6 deletions internal/circuitbreaker/breaker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func Test_breaker_isReady(t *testing.T) {
minSamples int64
openTimeout time.Duration
openExp int64
closedRefreshTimeout time.Duration
closedRefreshTimeout time.Duration
closedRefreshExp int64
}
type want struct {
Expand Down Expand Up @@ -162,7 +162,7 @@ func Test_breaker_isReady(t *testing.T) {
minSamples: test.fields.minSamples,
openTimeout: test.fields.openTimeout,
openExp: test.fields.openExp,
closedRefreshTimeout: test.fields.closedRefreshTimeout,
closedRefreshTimeout: test.fields.closedRefreshTimeout,
closedRefreshExp: test.fields.closedRefreshExp,
}

Expand All @@ -186,7 +186,7 @@ func Test_breaker_success(t *testing.T) {
minSamples int64
openTimeout time.Duration
openExp int64
closedRefreshTimeout time.Duration
closedRefreshTimeout time.Duration
closedRefreshExp int64
}
type want struct{}
Expand Down Expand Up @@ -281,7 +281,7 @@ func Test_breaker_success(t *testing.T) {
minSamples: test.fields.minSamples,
openTimeout: test.fields.openTimeout,
openExp: test.fields.openExp,
closedRefreshTimeout: test.fields.closedRefreshTimeout,
closedRefreshTimeout: test.fields.closedRefreshTimeout,
closedRefreshExp: test.fields.closedRefreshExp,
}
if test.afterFunc != nil {
Expand All @@ -308,7 +308,7 @@ func Test_breaker_fail(t *testing.T) {
minSamples int64
openTimeout time.Duration
openExp int64
closedRefreshTimeout time.Duration
closedRefreshTimeout time.Duration
closedRefreshExp int64
}
type want struct{}
Expand Down Expand Up @@ -439,7 +439,7 @@ func Test_breaker_fail(t *testing.T) {
minSamples: test.fields.minSamples,
openTimeout: test.fields.openTimeout,
openExp: test.fields.openExp,
closedRefreshTimeout: test.fields.closedRefreshTimeout,
closedRefreshTimeout: test.fields.closedRefreshTimeout,
closedRefreshExp: test.fields.closedRefreshExp,
}
if test.afterFunc != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/core/ngt/service/ngt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,7 @@ func Test_ngt_InsertUpsert(t *testing.T) {
return
}
type args struct {
indices []index
indices []index
poolSize uint32
bulkSize int
}
Expand Down

0 comments on commit 92ea4ec

Please sign in to comment.