A CLI command to find duplicate values in a MongoDB collection.
Frédéric G. MARAND 802611a515 Just a tiny script. | il y a 4 mois | |
---|---|---|
.gitignore | il y a 4 mois | |
LICENSE | il y a 4 mois | |
Makefile | il y a 4 mois | |
README.md | il y a 4 mois | |
example.env | il y a 4 mois | |
go.mod | il y a 4 mois | |
go.sum | il y a 4 mois | |
main.go | il y a 4 mois |
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.