Is there a better alternative to `gofmt`?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • gofumpt

    A stricter gofmt

    I use gofumpt but I'm pretty sure it doesn't wrap either (and I don't want it to so we're good)

  • prettier

    Prettier is an opinionated code formatter.

    For JavaScript I love https://prettier.io/ - is there something similar for Go that provides a stricter and more opinionated formatting?

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • revive

    🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint

    Been using https://github.com/mgechev/revive in all my projects.

  • golangci-lint

    Fast linters Runner for Go

    Goimports and revive (golint is deprecated iirc, so stick to revive) are nice. I have been using golangci lint with different linters enabled, which works really well. https://github.com/golangci/golangci-lint

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts