Resolve linting issues before i merge.
Run make lint
Running golangci-lint...
cmd/broker/db.go:358:2: rangeValCopy: each iteration copies 168 bytes (consider pointers or indexing) (gocritic)
for _, db := range dbs {
^
pkg/broker/config/dbedit.go:163:2: rangeValCopy: each iteration copies 168 bytes (consider pointers or indexing) (gocritic)
for _, db := range dbs {
^
2 issues:
Resolve linting issues before i merge.
Run make lint
Running golangci-lint...
cmd/broker/db.go:358:2: rangeValCopy: each iteration copies 168 bytes (consider pointers or indexing) (gocritic)
for _, db := range dbs {
^
pkg/broker/config/dbedit.go:163:2: rangeValCopy: each iteration copies 168 bytes (consider pointers or indexing) (gocritic)
for _, db := range dbs {
^
2 issues:
* gocritic: 2
make: *** [Makefile:154: lint] Error 1
Refreshed this PR with the latest main and addressed the requested lint findings.
Changes:
Merged latest origin/main (including merged PR #6) into issue-3-cli-database-management.
Fixed both rangeValCopy findings by iterating over database slices by index:
cmd/broker/db.go
pkg/broker/config/dbedit.go
Resolved the go.mod merge conflict while preserving the metrics dependencies from main.
Published commit: 0f2e3aab2618cc3cd8d7ebd9a56b0bbd46d36fa9
Remote branch SHA was verified to match.
Verification:
go test ./cmd/broker ./pkg/... — PASS
go vet ./cmd/broker ./pkg/... — PASS
go build ./cmd/broker — PASS
git diff origin/main...HEAD --check — PASS
make lint could not execute locally because the installed golangci-lint is v1 while this repository uses v2 configuration; the reported rangeValCopy findings are fixed in the branch.
Refreshed this PR with the latest `main` and addressed the requested lint findings.
Changes:
- Merged latest `origin/main` (including merged PR #6) into `issue-3-cli-database-management`.
- Fixed both `rangeValCopy` findings by iterating over database slices by index:
- `cmd/broker/db.go`
- `pkg/broker/config/dbedit.go`
- Resolved the `go.mod` merge conflict while preserving the metrics dependencies from `main`.
Published commit: `0f2e3aab2618cc3cd8d7ebd9a56b0bbd46d36fa9`
Remote branch SHA was verified to match.
Verification:
- `go test ./cmd/broker ./pkg/...` — PASS
- `go vet ./cmd/broker ./pkg/...` — PASS
- `go build ./cmd/broker` — PASS
- `git diff origin/main...HEAD --check` — PASS
- `make lint` could not execute locally because the installed golangci-lint is v1 while this repository uses v2 configuration; the reported `rangeValCopy` findings are fixed in the branch.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements wdevs/pgsql-broker#3.
Summary:
db add,remove,disable,enable, andlistcommands--fromVerification:
go test ./cmd/broker ./pkg/...— PASSgo vet ./cmd/broker ./pkg/...— PASSgo build -o /tmp/pgsql-broker-verify ./cmd/broker— PASSgit diff --check— PASSgo test ./...— BLOCKED by integration PostgreSQL unavailable at 127.0.0.1:5433; unit/package tests passedBranch: issue-3-cli-database-management
Commit:
7fb64961e7Resolve linting issues before i merge.
Run make lint
Running golangci-lint...
cmd/broker/db.go:358:2: rangeValCopy: each iteration copies 168 bytes (consider pointers or indexing) (gocritic)
for _, db := range dbs {
^
pkg/broker/config/dbedit.go:163:2: rangeValCopy: each iteration copies 168 bytes (consider pointers or indexing) (gocritic)
for _, db := range dbs {
^
2 issues:
make: *** [Makefile:154: lint] Error 1
@sgcommand refresh this pr with the laster changes in master
Refreshed this PR with the latest
mainand addressed the requested lint findings.Changes:
origin/main(including merged PR #6) intoissue-3-cli-database-management.rangeValCopyfindings by iterating over database slices by index:cmd/broker/db.gopkg/broker/config/dbedit.gogo.modmerge conflict while preserving the metrics dependencies frommain.Published commit:
0f2e3aab2618cc3cd8d7ebd9a56b0bbd46d36fa9Remote branch SHA was verified to match.
Verification:
go test ./cmd/broker ./pkg/...— PASSgo vet ./cmd/broker ./pkg/...— PASSgo build ./cmd/broker— PASSgit diff origin/main...HEAD --check— PASSmake lintcould not execute locally because the installed golangci-lint is v1 while this repository uses v2 configuration; the reportedrangeValCopyfindings are fixed in the branch.