Skip to content

Commit

Permalink
chore: run gofumpt
Browse files Browse the repository at this point in the history
  • Loading branch information
sashamelentyev committed Dec 2, 2024
1 parent 1654875 commit 4e188e2
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gen/genfs/genfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ func (t FormattedSource) WriteFile(name string, content []byte) error {
}
out = buf
}
return os.WriteFile(filepath.Join(t.Root, name), out, 0644)
return os.WriteFile(filepath.Join(t.Root, name), out, 0o644)
}
6 changes: 4 additions & 2 deletions gen/schema_gen_sum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ func Test_mergeEnums(t *testing.T) {
"a", "b",
0, 2,
false, true,
[]any{1}, []any{2},
[]any{1},
[]any{2},
}, []any{
"a", "c",
0, 3,
true,
[]any{1}, []any{[]any{1}},
[]any{1},
[]any{[]any{1}},
}, []any{
"a",
0,
Expand Down
3 changes: 1 addition & 2 deletions internal/integration/e2e_err_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import (
api "github.com/ogen-go/ogen/internal/integration/sample_err"
)

type sampleErrServer struct {
}
type sampleErrServer struct{}

func (s sampleErrServer) DataCreate(ctx context.Context, req api.OptData) (*api.Data, error) {
panic("implement me")
Expand Down
7 changes: 5 additions & 2 deletions internal/integration/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ func (h metricsTestHandler) APIKey(ctx context.Context, operationName string) (a
}

var _ api.Handler = metricsTestHandler{}
var _ api.SecurityHandler = metricsTestHandler{}
var _ api.SecuritySource = metricsTestHandler{}

var (
_ api.SecurityHandler = metricsTestHandler{}
_ api.SecuritySource = metricsTestHandler{}
)

func labelerMiddleware(req middleware.Request, next middleware.Next) (middleware.Response, error) {
labeler, _ := api.LabelerFromContext(req.Context)
Expand Down
2 changes: 1 addition & 1 deletion json/unix_str_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ func TestStringUnix(t *testing.T) {
func TestDecodeStringUnixNano(t *testing.T) {
got, err := DecodeStringUnixNano(jx.DecodeStr(`"1586960586000000000"`))
require.NoError(t, err)
want := time.Date(2020, 04, 15, 14, 23, 06, 0, time.UTC)
want := time.Date(2020, 0o4, 15, 14, 23, 0o6, 0, time.UTC)
require.True(t, want.Equal(got))
}
2 changes: 1 addition & 1 deletion json/unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ func TestUnix(t *testing.T) {
func TestDecodeUnixNano(t *testing.T) {
got, err := DecodeUnixNano(jx.DecodeStr(`1586960586000000000`))
require.NoError(t, err)
want := time.Date(2020, 04, 15, 14, 23, 06, 0, time.UTC)
want := time.Date(2020, 0o4, 15, 14, 23, 0o6, 0, time.UTC)
require.True(t, want.Equal(got))
}
2 changes: 1 addition & 1 deletion json/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func EncodeUUID(s *jx.Encoder, v uuid.UUID) {
length = len(v)*2 + 4
quotedLength = length + 2
)
var dst = [quotedLength]byte{
dst := [quotedLength]byte{
0: '"',
quotedLength - 1: '"',
}
Expand Down
3 changes: 2 additions & 1 deletion validate/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package validate

import (
"fmt"
"github.com/ogen-go/ogen/ogenregex"
"strings"

"github.com/ogen-go/ogen/ogenregex"

"github.com/go-faster/errors"
)

Expand Down

0 comments on commit 4e188e2

Please sign in to comment.