Loong Dai

Results 144 comments of Loong Dai

Please add a flag for this feature since some users do not want to config order.

https://github.com/daixiang0/gci/pull/70 has simplified some parts of it. If you have some ideas about it, feel free to share them here or post a PR directly :)

If you want `gci` work with `goimports`, you should add `Prefix(github.com/a)` and `Prefix(github.com/client)`, since they are belonged to the same type but a different way to group.

Although there is a conflict, `golangci-lint` would return a definite result. Also, you can skip use GCI for some files with `golangci-lint` config.

Actually `goimports` would add an empty line before comments(not only for multi-lines) which break the sections from `gci`: ``` "fmt" // test1 "go/test1" // test2 "go/test2" ``` to ``` "fmt"...

A workaround is that put comments after import. I do not know why `goimports` does it.

@ttys3 thanks for your report, I will take a look.

This is an useful feature I think :)

Thanks for your contribution, now it has changed a lot. I will review if you update it.

I think this feature is helpful for a project, we can detect from `go.mod`. But for a file, it is hard to detect. Maybe we can skip single file support...