Generate groups and reorders imports incorrectly
未关闭
- 主要语言
- Go
- 星标
- 10.8k
- 派生
- 1.3k
- 平均合并
- 2 天 36 分钟
- 30 天内合并 PR
- 26
描述
gqlgen version: v0.17.66
go version: 1.23.3
full repro: https://github.com/mdakovac/gqlgen-import-sorting/tree/main
Go lets you group imports by separating them with a newline, however when you run the `generate` command, this grouping is broken.
import statement before `generate` in `graph/schema.resolvers.go` file
```
import (
"context"
"fmt"
"github.com/rs/zerolog"
"github.com/example/gqlgen-import-sorting/graph/model"
"github.com/spf13/viper"
)
```
after `generate`
```
import (
"context"
"fmt"
"github.com/example/gqlgen-import-sorting/graph/model"
"github.com/rs/zerolog"
"github.com/spf13/viper"
)
```
贡献指南
评估
这个 Issue 还没有评估数据。