pg-sharding / spqr

Stateless Postgres Query Router.
https://pg-sharding.tech
Other
935 stars 46 forks source link

Add go fmt check #812

Closed Denchick closed 1 week ago

Denchick commented 1 week ago

Introduce 2 brand-new commands: make fmtcheck and make fmt.

make fmcheck failed:

➜  spqr git:(denchick-journey-5) ✗ make fmtcheck
==> Checking that code complies with gofmt requirements...
gofmt needs running on the following files:
./pkg/config/coordinator.go
./pkg/config/balancer.go
./pkg/meta/meta.go
./pkg/decode/spqrql_test.go
./pkg/pool/shardpool_test.go
./pkg/pool/dbpool.go
./pkg/client/clientpool.go
You can use the command: `make fmt` to reformat code.
make: *** [fmtcheck] Error 1

make fmcheck passed:

➜  spqr git:(more-linters) ✗ make fmtcheck
==> Checking that code complies with gofmt requirements...
OK