Intellij shows incorrect suggestion for Go string interpolation for fmt.Printf()
已回答
The actual code is

Intellij shows this hint for this code:

This hint is not even correct Go code as far as I can tell. Why is it showing this?
请先登录再写评论。
Code Folding provides the following hint. You can disable it via Preferences/Settings | Editor | General | Code Folding | Go.
I don't see how it could be code folding because it's one line. And the suggestion shown is incorrect Go code.
Under Preferences/Settings | Editor | General | Code Folding | Go you can find several entries:
In your particular case, Format strings option folds your code inside fmt.Printf() function and you can unfold it by clicking on the string
The following folding is helpful to view arguments as values, fox example:
fmt.Errorf("line: %d, column: %d", 1, 2)Will show:
line: #{1}, column: #{2}I hope it helps.
That code folding is annoying.
Hi Learnloop365, we've changed it in recent EAP versions: https://blog.jetbrains.com/go/2023/09/25/the-goland-2023-3-early-access-program-has-started/#improved-code-folding-style