Skip to content

Commit ed276e8

Browse files
committed
refactor: make gqlgen compatible with gofumpt
1 parent 81f70a8 commit ed276e8

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.github/workflows/lint.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ jobs:
2020
go-version-file: "go.mod"
2121
cache: true
2222

23-
- name: Install dependencies and tools
24-
run: |
25-
go mod download
26-
go install mvdan.cc/gofumpt@latest
23+
- name: Install dependencies
24+
run: go mod download
2725

2826
- name: Generate GraphQL code
2927
run: go generate .
@@ -34,4 +32,4 @@ jobs:
3432
version: latest
3533

3634
- name: Run gofumpt
37-
run: gofumpt -d .
35+
run: go tool gofumpt -d -l .

generate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ package main
22

33
//go:generate go run -mod=mod ./ent/entc.go
44
//go:generate go tool gqlgen generate
5+
//go:generate go tool gofumpt -w .

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,12 @@ require (
149149
google.golang.org/grpc v1.76.0 // indirect
150150
google.golang.org/protobuf v1.36.10 // indirect
151151
gopkg.in/yaml.v3 v3.0.1 // indirect
152+
mvdan.cc/gofumpt v0.9.1 // indirect
152153
)
153154

154155
tool (
155156
entgo.io/ent/cmd/ent
156157
github.com/99designs/gqlgen
157158
github.com/99designs/gqlgen/graphql/introspection
159+
mvdan.cc/gofumpt
158160
)

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn
108108
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
109109
github.com/go-playground/validator/v10 v10.28.0 h1:Q7ibns33JjyW48gHkuFT91qX48KG0ktULL6FgHdG688=
110110
github.com/go-playground/validator/v10 v10.28.0/go.mod h1:GoI6I1SjPBh9p7ykNE/yj3fFYbyDOpwMn5KXd+m2hUU=
111+
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
112+
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
111113
github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68=
112114
github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
113115
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
@@ -373,3 +375,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
373375
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
374376
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
375377
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
378+
mvdan.cc/gofumpt v0.9.1 h1:p5YT2NfFWsYyTieYgwcQ8aKV3xRvFH4uuN/zB2gBbMQ=
379+
mvdan.cc/gofumpt v0.9.1/go.mod h1:3xYtNemnKiXaTh6R4VtlqDATFwBbdXI8lJvH/4qk7mw=

0 commit comments

Comments
 (0)