DEV Community 👩‍💻👨‍💻

Maxime Guilbert
Maxime Guilbert

Posted on

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


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

pkg/component/dog.go:5: File is not `goimports`-ed (goimports)
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! 🍺

Top comments (0)

Dream Big

Use any Linode offering to create something unique or silly in the DEV x Linode Hackathon 2022 and win the Wacky Wildcard category.

Join the Hackathon <-