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

Refactor: Tidy some imports and tests #4032

Closed cbandy closed 4 days ago

cbandy commented 1 week ago

This adds two functions to internal/controller/runtime to reduce the imports in the pgBackRest controller and adds a linter to keep github.com/pkg/errors out of tests.

This also uses golang.org/x/tools/go/packages to load VolumeSnapshot CRDs from the (already downloaded) client Go module.