Switch to new go tool pattern for external tool deps

This commit is contained in:
2025-12-16 08:49:17 +01:00
parent 457c944ec6
commit 6f49998ad3
3 changed files with 7 additions and 11 deletions

View File

@@ -50,12 +50,12 @@ frontend:
swagger:
$(info ===> GENERATE swagger)
@go run github.com/swaggo/swag/cmd/swag init --parseDependency -d ./internal/api -g rest.go -o ./api
@go tool github.com/swaggo/swag/cmd/swag init --parseDependency -d ./internal/api -g rest.go -o ./api
@mv ./api/docs.go ./internal/api/docs.go
graphql:
$(info ===> GENERATE graphql)
@go run github.com/99designs/gqlgen
@go tool github.com/99designs/gqlgen
clean:
$(info ===> CLEAN)

5
go.mod
View File

@@ -4,6 +4,11 @@ go 1.24.0
toolchain go1.24.1
tool (
github.com/99designs/gqlgen
github.com/swaggo/swag/cmd/swag
)
require (
github.com/99designs/gqlgen v0.17.84
github.com/ClusterCockpit/cc-lib v1.0.0

View File

@@ -1,9 +0,0 @@
//go:build tools
// +build tools
package tools
import (
_ "github.com/99designs/gqlgen"
_ "github.com/swaggo/swag/cmd/swag"
)