From 92628d2f85fc0f1f2dbb6f18a14049f74de803db Mon Sep 17 00:00:00 2001 From: Roee Stark Date: Tue, 25 Jun 2024 17:38:50 -0500 Subject: [PATCH] run goimports on all files --- _examples/benchmarking/benchmarks_test.go | 3 ++- _examples/benchmarking/resolvers.go | 3 ++- graphql/coercion_test.go | 3 ++- graphql/executable_schema_mock.go | 3 ++- graphql/executor/testexecutor/testexecutor.go | 3 ++- graphql/float.go | 3 ++- graphql/handler/apollofederatedtracingv1/tracing_test.go | 3 ++- graphql/handler/apollotracing/tracer_test.go | 3 ++- graphql/handler/transport/http_form_multipart.go | 3 ++- graphql/handler/transport/http_get.go | 3 ++- graphql/handler/transport/sse.go | 3 ++- graphql/handler/transport/util.go | 3 ++- graphql/handler/transport/websocket.go | 3 ++- graphql/handler/transport/websocket_graphql_transport_ws.go | 1 + graphql/handler/transport/websocket_graphqlws.go | 1 + graphql/handler/transport/websocket_subprotocol.go | 1 + graphql/handler/transport/websocket_test.go | 3 ++- graphql/id.go | 3 ++- graphql/int.go | 3 ++- graphql/int_test.go | 3 ++- graphql/map.go | 3 ++- graphql/omittable.go | 1 + graphql/omittable_test.go | 3 ++- graphql/response.go | 1 + graphql/string_test.go | 3 ++- graphql/uint.go | 3 ++- graphql/uint_test.go | 3 ++- 27 files changed, 49 insertions(+), 22 deletions(-) diff --git a/_examples/benchmarking/benchmarks_test.go b/_examples/benchmarking/benchmarks_test.go index a669f426ca..8d737d6d3b 100644 --- a/_examples/benchmarking/benchmarks_test.go +++ b/_examples/benchmarking/benchmarks_test.go @@ -2,9 +2,10 @@ package benchmarking import ( "fmt" + "testing" + "github.com/99designs/gqlgen/_examples/benchmarking/models" gqlclient "github.com/99designs/gqlgen/client" - "testing" "github.com/99designs/gqlgen/_examples/benchmarking/generated" "github.com/99designs/gqlgen/graphql/handler" diff --git a/_examples/benchmarking/resolvers.go b/_examples/benchmarking/resolvers.go index 80fb3a7edb..d8315814df 100644 --- a/_examples/benchmarking/resolvers.go +++ b/_examples/benchmarking/resolvers.go @@ -6,9 +6,10 @@ package benchmarking import ( "context" "errors" + "strings" + "github.com/99designs/gqlgen/_examples/benchmarking/generated" "github.com/99designs/gqlgen/_examples/benchmarking/models" - "strings" ) type Resolver struct { diff --git a/graphql/coercion_test.go b/graphql/coercion_test.go index d5dda09102..e0dfd7c140 100644 --- a/graphql/coercion_test.go +++ b/graphql/coercion_test.go @@ -1,9 +1,10 @@ package graphql import ( - "github.com/goccy/go-json" "testing" + "github.com/goccy/go-json" + "github.com/stretchr/testify/assert" ) diff --git a/graphql/executable_schema_mock.go b/graphql/executable_schema_mock.go index c4c4118975..a611caedd3 100644 --- a/graphql/executable_schema_mock.go +++ b/graphql/executable_schema_mock.go @@ -5,8 +5,9 @@ package graphql import ( "context" - "github.com/vektah/gqlparser/v2/ast" "sync" + + "github.com/vektah/gqlparser/v2/ast" ) // Ensure, that ExecutableSchemaMock does implement ExecutableSchema. diff --git a/graphql/executor/testexecutor/testexecutor.go b/graphql/executor/testexecutor/testexecutor.go index fed765926e..698895027d 100644 --- a/graphql/executor/testexecutor/testexecutor.go +++ b/graphql/executor/testexecutor/testexecutor.go @@ -5,10 +5,11 @@ import ( "context" "errors" "fmt" - "github.com/goccy/go-json" "io" "time" + "github.com/goccy/go-json" + "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" diff --git a/graphql/float.go b/graphql/float.go index 110cbaff0b..3429f4dc1c 100644 --- a/graphql/float.go +++ b/graphql/float.go @@ -4,10 +4,11 @@ import ( "context" "errors" "fmt" - "github.com/goccy/go-json" "io" "math" "strconv" + + "github.com/goccy/go-json" ) func MarshalFloat(f float64) Marshaler { diff --git a/graphql/handler/apollofederatedtracingv1/tracing_test.go b/graphql/handler/apollofederatedtracingv1/tracing_test.go index ee710a2602..f73ea2678c 100644 --- a/graphql/handler/apollofederatedtracingv1/tracing_test.go +++ b/graphql/handler/apollofederatedtracingv1/tracing_test.go @@ -3,7 +3,6 @@ package apollofederatedtracingv1_test import ( "context" "encoding/base64" - "github.com/goccy/go-json" "io" "net/http" "net/http/httptest" @@ -11,6 +10,8 @@ import ( "testing" "time" + "github.com/goccy/go-json" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/vektah/gqlparser/v2/gqlerror" diff --git a/graphql/handler/apollotracing/tracer_test.go b/graphql/handler/apollotracing/tracer_test.go index 3f65c9bcf7..c9eef86f0a 100644 --- a/graphql/handler/apollotracing/tracer_test.go +++ b/graphql/handler/apollotracing/tracer_test.go @@ -1,7 +1,6 @@ package apollotracing_test import ( - "github.com/goccy/go-json" "io" "net/http" "net/http/httptest" @@ -9,6 +8,8 @@ import ( "testing" "time" + "github.com/goccy/go-json" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/vektah/gqlparser/v2/ast" diff --git a/graphql/handler/transport/http_form_multipart.go b/graphql/handler/transport/http_form_multipart.go index ecf6251f0b..1bddbada81 100644 --- a/graphql/handler/transport/http_form_multipart.go +++ b/graphql/handler/transport/http_form_multipart.go @@ -1,12 +1,13 @@ package transport import ( - "github.com/goccy/go-json" "io" "mime" "net/http" "os" + "github.com/goccy/go-json" + "github.com/99designs/gqlgen/graphql" ) diff --git a/graphql/handler/transport/http_get.go b/graphql/handler/transport/http_get.go index 667f46a526..14b0eec52b 100644 --- a/graphql/handler/transport/http_get.go +++ b/graphql/handler/transport/http_get.go @@ -1,12 +1,13 @@ package transport import ( - "github.com/goccy/go-json" "io" "net/http" "net/url" "strings" + "github.com/goccy/go-json" + "github.com/vektah/gqlparser/v2/ast" "github.com/vektah/gqlparser/v2/gqlerror" diff --git a/graphql/handler/transport/sse.go b/graphql/handler/transport/sse.go index 31fbf89d27..9c661647df 100644 --- a/graphql/handler/transport/sse.go +++ b/graphql/handler/transport/sse.go @@ -2,13 +2,14 @@ package transport import ( "fmt" - "github.com/goccy/go-json" "io" "log" "mime" "net/http" "strings" + "github.com/goccy/go-json" + "github.com/vektah/gqlparser/v2/gqlerror" "github.com/99designs/gqlgen/graphql" diff --git a/graphql/handler/transport/util.go b/graphql/handler/transport/util.go index 6807ea8d61..78652be1fa 100644 --- a/graphql/handler/transport/util.go +++ b/graphql/handler/transport/util.go @@ -2,9 +2,10 @@ package transport import ( "fmt" - "github.com/goccy/go-json" "io" + "github.com/goccy/go-json" + "github.com/vektah/gqlparser/v2/gqlerror" "github.com/99designs/gqlgen/graphql" diff --git a/graphql/handler/transport/websocket.go b/graphql/handler/transport/websocket.go index 9e78f4ef25..391680019a 100644 --- a/graphql/handler/transport/websocket.go +++ b/graphql/handler/transport/websocket.go @@ -5,13 +5,14 @@ import ( "context" "errors" "fmt" - "github.com/goccy/go-json" "log" "net" "net/http" "sync" "time" + "github.com/goccy/go-json" + "github.com/gorilla/websocket" "github.com/vektah/gqlparser/v2/gqlerror" diff --git a/graphql/handler/transport/websocket_graphql_transport_ws.go b/graphql/handler/transport/websocket_graphql_transport_ws.go index 269e80b0a0..2379aecf40 100644 --- a/graphql/handler/transport/websocket_graphql_transport_ws.go +++ b/graphql/handler/transport/websocket_graphql_transport_ws.go @@ -2,6 +2,7 @@ package transport import ( "fmt" + "github.com/goccy/go-json" "github.com/gorilla/websocket" diff --git a/graphql/handler/transport/websocket_graphqlws.go b/graphql/handler/transport/websocket_graphqlws.go index c48937c1e2..ee469fe4af 100644 --- a/graphql/handler/transport/websocket_graphqlws.go +++ b/graphql/handler/transport/websocket_graphqlws.go @@ -2,6 +2,7 @@ package transport import ( "fmt" + "github.com/goccy/go-json" "github.com/gorilla/websocket" diff --git a/graphql/handler/transport/websocket_subprotocol.go b/graphql/handler/transport/websocket_subprotocol.go index 9f306047ca..8c0bb50d7a 100644 --- a/graphql/handler/transport/websocket_subprotocol.go +++ b/graphql/handler/transport/websocket_subprotocol.go @@ -2,6 +2,7 @@ package transport import ( "errors" + "github.com/goccy/go-json" "github.com/gorilla/websocket" diff --git a/graphql/handler/transport/websocket_test.go b/graphql/handler/transport/websocket_test.go index edacdad0fa..df2d309576 100644 --- a/graphql/handler/transport/websocket_test.go +++ b/graphql/handler/transport/websocket_test.go @@ -3,13 +3,14 @@ package transport_test import ( "context" "errors" - "github.com/goccy/go-json" "net/http" "net/http/httptest" "strings" "testing" "time" + "github.com/goccy/go-json" + "github.com/gorilla/websocket" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/graphql/id.go b/graphql/id.go index 86d795c110..24caf2d45b 100644 --- a/graphql/id.go +++ b/graphql/id.go @@ -2,9 +2,10 @@ package graphql import ( "fmt" - "github.com/goccy/go-json" "io" "strconv" + + "github.com/goccy/go-json" ) func MarshalID(s string) Marshaler { diff --git a/graphql/int.go b/graphql/int.go index 708b7f763e..7259264042 100644 --- a/graphql/int.go +++ b/graphql/int.go @@ -2,9 +2,10 @@ package graphql import ( "fmt" - "github.com/goccy/go-json" "io" "strconv" + + "github.com/goccy/go-json" ) func MarshalInt(i int) Marshaler { diff --git a/graphql/int_test.go b/graphql/int_test.go index 5ea5b4e00e..ae8a7c500e 100644 --- a/graphql/int_test.go +++ b/graphql/int_test.go @@ -1,9 +1,10 @@ package graphql import ( - "github.com/goccy/go-json" "testing" + "github.com/goccy/go-json" + "github.com/stretchr/testify/assert" ) diff --git a/graphql/map.go b/graphql/map.go index 21b86cbae7..e92d5f23c9 100644 --- a/graphql/map.go +++ b/graphql/map.go @@ -2,8 +2,9 @@ package graphql import ( "fmt" - "github.com/goccy/go-json" "io" + + "github.com/goccy/go-json" ) func MarshalMap(val map[string]interface{}) Marshaler { diff --git a/graphql/omittable.go b/graphql/omittable.go index 9ac2f8e38b..15e41cbc3d 100644 --- a/graphql/omittable.go +++ b/graphql/omittable.go @@ -2,6 +2,7 @@ package graphql import ( "encoding/json" + fastjson "github.com/goccy/go-json" ) diff --git a/graphql/omittable_test.go b/graphql/omittable_test.go index aacf9b4d80..31ffbb15f4 100644 --- a/graphql/omittable_test.go +++ b/graphql/omittable_test.go @@ -1,9 +1,10 @@ package graphql import ( - "github.com/goccy/go-json" "testing" + "github.com/goccy/go-json" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/graphql/response.go b/graphql/response.go index a5076af6d8..cd1fe561bf 100644 --- a/graphql/response.go +++ b/graphql/response.go @@ -3,6 +3,7 @@ package graphql import ( "context" "fmt" + "github.com/goccy/go-json" "github.com/vektah/gqlparser/v2/ast" diff --git a/graphql/string_test.go b/graphql/string_test.go index 906142c9d5..d0536f34fb 100644 --- a/graphql/string_test.go +++ b/graphql/string_test.go @@ -1,9 +1,10 @@ package graphql import ( - "github.com/goccy/go-json" "testing" + "github.com/goccy/go-json" + "github.com/stretchr/testify/assert" ) diff --git a/graphql/uint.go b/graphql/uint.go index 9427be9ff4..f7c5fe22bb 100644 --- a/graphql/uint.go +++ b/graphql/uint.go @@ -3,9 +3,10 @@ package graphql import ( "errors" "fmt" - "github.com/goccy/go-json" "io" "strconv" + + "github.com/goccy/go-json" ) func MarshalUint(i uint) Marshaler { diff --git a/graphql/uint_test.go b/graphql/uint_test.go index e2b7450ded..2857336f28 100644 --- a/graphql/uint_test.go +++ b/graphql/uint_test.go @@ -1,10 +1,11 @@ package graphql import ( - "github.com/goccy/go-json" "math" "testing" + "github.com/goccy/go-json" + "github.com/stretchr/testify/assert" )