go-fuego / fuego

Golang Fuego - web framework generating OpenAPI 3 spec from source code
https://go-fuego.github.io/fuego/
MIT License
918 stars 46 forks source link

sort go imports #186

Closed ccoVeille closed 2 months ago

ccoVeille commented 2 months ago

The idea is to use the following pattern

import (                                                                                                                                                                                   
        // std lib imports                                                                                                                                                                     

        // third party imports                                                                                                                                                                 

        // package imports from fuego                                                                                                                                                          
)                                                                                                                                                                                          

More information about this in the following discussion

184

ccoVeille commented 2 months ago

I added 2 commits, please review them

I used mdsf, which provide a good result

ccoVeille commented 2 months ago

Please look at what I said here

https://github.com/go-fuego/fuego/discussions/184#discussioncomment-10511397

gopls can be configured with formatting.local

ccoVeille commented 2 months ago

Also if the CI fails, gci will provide the exact command line to run to fix the issues

Also, golangci-lint can be run with --fix to format the files.

So, it's only a matter of documentation

EwenQuim commented 2 months ago

Perfect!

Thanks