Skip to content

Commit 456dcc0

Browse files
authored
chore: use go tool directive (#3507)
1 parent 2721f82 commit 456dcc0

File tree

7 files changed

+15
-19
lines changed

7 files changed

+15
-19
lines changed

api/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config=codegen.yaml ./openapi.yaml
1+
//go:generate go tool github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config=codegen.yaml ./openapi.yaml
22
package api

api/client/go/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config=codegen.yaml ../../openapi.cloud.yaml
1+
//go:generate go tool github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config=codegen.yaml ../../openapi.cloud.yaml
22
package openmeter
33

44
import (

api/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run github.com/jmattheis/goverter/cmd/goverter gen ./
1+
//go:generate go tool github.com/jmattheis/goverter/cmd/goverter gen ./
22

33
package api
44

go.mod

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ require (
3939
github.com/huandu/go-sqlbuilder v1.38.0
4040
github.com/invopop/gobl v0.301.0
4141
github.com/jackc/pgx/v5 v5.7.6
42-
github.com/jmattheis/goverter v1.9.2
4342
github.com/lmittmann/tint v1.1.2
4443
github.com/mitchellh/mapstructure v1.5.0
4544
github.com/oapi-codegen/nethttp-middleware v1.1.2
46-
github.com/oapi-codegen/oapi-codegen/v2 v2.5.0
4745
github.com/oapi-codegen/runtime v1.1.2
4846
github.com/oklog/run v1.1.1-0.20240127200640-eee6e044b77c
4947
github.com/oklog/ulid/v2 v2.1.1
@@ -89,7 +87,6 @@ require (
8987
golang.org/x/net v0.46.0
9088
google.golang.org/grpc v1.76.0
9189
google.golang.org/protobuf v1.36.10
92-
gotest.tools/gotestsum v1.13.0
9390
k8s.io/api v0.34.1
9491
k8s.io/apimachinery v0.34.1
9592
k8s.io/client-go v0.34.1
@@ -149,6 +146,7 @@ require (
149146
github.com/invopop/validation v0.8.0 // indirect
150147
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
151148
github.com/jcmturner/goidentity/v6 v6.0.1 // indirect
149+
github.com/jmattheis/goverter v1.9.2 // indirect
152150
github.com/jonboulle/clockwork v0.5.0 // indirect
153151
github.com/jzelinskie/stringz v0.0.3 // indirect
154152
github.com/kevinburke/ssh_config v1.2.0 // indirect
@@ -157,6 +155,7 @@ require (
157155
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect
158156
github.com/ncruces/go-strftime v0.1.9 // indirect
159157
github.com/neo4j/neo4j-go-driver/v5 v5.28.1 // indirect
158+
github.com/oapi-codegen/oapi-codegen/v2 v2.5.0 // indirect
160159
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
161160
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
162161
github.com/pgvector/pgvector-go v0.3.0 // indirect
@@ -195,6 +194,7 @@ require (
195194
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
196195
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
197196
gopkg.in/warnings.v0 v0.1.2 // indirect
197+
gotest.tools/gotestsum v1.13.0 // indirect
198198
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
199199
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
200200
sigs.k8s.io/randfill v1.0.0 // indirect
@@ -530,3 +530,10 @@ require (
530530
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
531531
sigs.k8s.io/yaml v1.6.0 // indirect
532532
)
533+
534+
tool (
535+
github.com/google/wire/cmd/wire
536+
github.com/jmattheis/goverter/cmd/goverter
537+
github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen
538+
gotest.tools/gotestsum
539+
)

openmeter/apiconverter/filter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run github.com/jmattheis/goverter/cmd/goverter gen ./
1+
//go:generate go tool github.com/jmattheis/goverter/cmd/goverter gen ./
22
package apiconverter
33

44
import (

openmeter/billing/httpdriver/discounts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run github.com/jmattheis/goverter/cmd/goverter gen ./
1+
//go:generate go tool github.com/jmattheis/goverter/cmd/goverter gen ./
22

33
package httpdriver
44

tools.go

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)