golangci-lint
golangci-lint copied to clipboard
Printing out SuggestedFixes
output:
pkg/cmd/register/routes.go:40:12: fieldalignment: struct with 32 pointer bytes could be 16 (govet)
type route struct {
^
Rearrange fields
struct {
HTTPMethods map[string]*httpMethod `json:"httpMethods"`
Route string `json:"route"`
Streamable bool `json:"isStreamable,omitempty"`
AdminOnly bool `json:"isAdminOnlyAccess,omitempty"`
APIOnly bool `json:"apiOnlyAccess,omitempty"`
}
I still don't understand how to use the SuggestedFixes
properly, but I want to print them out, at least.
I'm also working on :wink:
I'm able to apply the fixes.
Maybe you can open an issue?
related to https://github.com/golangci/golangci-lint/issues/1322
I created an issue: #1779
@ldez
actually I need this for govet
, otherwise it's unclear what to do :))
I will keep it open for some time, then will close (when the autofix works)
some screen shots:



nlreturn
removes the lines, that's why there are empty lines