CrunchyData / postgres-operator

Production PostgreSQL for Kubernetes, from high availability Postgres clusters to full-scale database-as-a-service.
https://access.crunchydata.com/documentation/postgres-operator/v5/
Apache License 2.0
3.96k stars 593 forks source link

Enable the "errchkjson" linter #4027

Closed cbandy closed 2 weeks ago

cbandy commented 2 weeks ago

This is part of the bugs preset of golangci-lint. I want to enable this entire preset eventually.

The check-error-free-encoding setting is recommended upstream and simplifies code where json.Marshal is known to succeed.

Checklist:

Type of Changes:

cbandy commented 2 weeks ago

Some recent results compared to the ones in this PR.