DEV Community

Maxime Guilbert
Maxime Guilbert

Posted on • Updated on

How to debug : File is not `goimports`-ed (goimports)

#go

While you are linting you project, you may have the following error :

pkg/component/dog.go:5: File is not `goimports`-ed (goimports)
        "fmt"
Enter fullscreen mode Exit fullscreen mode

To resolve it, use the following command :

goimports -local "fmt" -w .
Enter fullscreen mode Exit fullscreen mode

Note : If you have another import targeted in your error message, please replace fmt with the import shown in the message.


I hope it will help you! 🍺


You want to support me?

Buy Me A Coffee

Top comments (0)