Skip to content

go fmt not working as expected in golangci-lint #5378

Answered by ldez
singh1203 asked this question in Q&A
Discussion options

You must be logged in to vote

First, go fmt is different than gofmt.
Inside golangci-lint, we use gofmt.

Currently gofmt is integrated as a linter, not as a formatter, so its scope is limited to the current module.

You don't provide enough information about your project to have a more precise answer.

I recommend reading the v2 issue: #5300

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@singh1203
Comment options

@ldez
Comment options

ldez Feb 6, 2025
Maintainer

Answer selected by ldez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants