A CLI command to find duplicate values in a MongoDB collection.
Frédéric G. MARAND 802611a515 Just a tiny script. | 5 months ago | |
---|---|---|
.gitignore | 5 months ago | |
LICENSE | 5 months ago | |
Makefile | 5 months ago | |
README.md | 5 months ago | |
example.env | 5 months ago | |
go.mod | 5 months ago | |
go.sum | 5 months ago | |
main.go | 5 months ago |
make lint
to verify codemake
make install
A CLI command to find duplicate values in a MongoDB collection.
.env
file based on the example provided
in example.envenvrun
command to load environment variables from that file:
go install github.com/fgm/envrun@latest
.env
. For the first check, configure it for an empty collection
in an empty database:
mongodb://localhost:27017
test
test
email
$ envrun go run ./docs/osinet/cmd/duplicates
$ envrun go run ./docs/osinet/cmd/duplicates -command seed
user1@example.com: 3
user2@example.com: 2
$ envrun go run ./docs/osinet/cmd/duplicates
Licensed under the Apache 2.0 license.