DEV Community

Maxime Guilbert
Maxime Guilbert

Posted on • Edited on

3 1

Comment corriger : File is not `gofmt`-ed with `-s` (gofmt)

Quand vous effectuer le lint de votre projet, vous pouvez tomber sur l'erreur suivante :

pkg/apis/dogs.go:11: File is not `gofmt`-ed with `-s` (gofmt)
Enter fullscreen mode Exit fullscreen mode

Pour résoudre ce soucis, utilisez la commande suivante :

gofmt -s -w .
Enter fullscreen mode Exit fullscreen mode

Cela va simplifier le code (avec l'option -s) et écrire le résultat dans les fichiers (avec l'option -w) sur tous les fichiers du dossier courant (avec .).


J'espère que ça vous aidera! 🍺


Vous voulez me supporter?

Buy Me A Coffee

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay