99designs / 99designs/gqlgen

Generate groups and reorders imports incorrectly

未关闭
#3,586 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
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 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。