You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
goimports works better than gofmt because it groups import. However, sometimes I want to enforce extra rules like putting proto imports at the bottom, group imports from current project together, warn/error if some packages are imported e.g. github.com/pkg/errors.
The code is still in progress in dyweb/gommon#127 (well 5+ months PR ... 咕咕.... And the post plans to cover the following
how gofmt and goimports works
how to parse go code, basic struct of go ast
modify go ast and dump it back to text
why we design gommon format this way
Update
The text was updated successfully, but these errors were encountered:
Type
Related
Description
goimports
works better thangofmt
because it groups import. However, sometimes I want to enforce extra rules like putting proto imports at the bottom, group imports from current project together, warn/error if some packages are imported e.g.github.com/pkg/errors
.The code is still in progress in dyweb/gommon#127 (well 5+ months PR ... 咕咕.... And the post plans to cover the following
gofmt
andgoimports
worksgommon format
this wayUpdate
The text was updated successfully, but these errors were encountered: