99designs / 99designs/gqlgen

Use go.work and workspaces

Đang mở
#2,879 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
10.8k
Fork
1.3k
Merge trung bình
2 ngày 36 phút
Pull request đã merge (30 ngày)
26

Mô tả

You've chosen a very strange way to install it. The CLI is usually used for such tasks. Example: protoc-gen-go for gRPC.
But to simplify your method, you can use the go.work file.

```sh
go work init
```

Then you need to create the tools directory with tools.go. Then execute `go mod init tools` and `go mod tidy`.

Then do the same for the main space and include two workspaces in go.work.

```sh
go 1.21.0

use (
.
tools
)
```

This is to separate the dependencies of the application and the generator.

![ч.png](https://github.com/99designs/gqlgen/assets/150515091/ae101123-5b75-46d0-b54c-21833b92ca89)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.