A CLI command to find duplicate values in a MongoDB collection.
Frédéric G. MARAND 202dcf46e5 Just a tiny script. | 4 ay önce | |
---|---|---|
.gitignore | 4 ay önce | |
LICENSE | 4 ay önce | |
Makefile | 4 ay önce | |
README.md | 4 ay önce | |
example.env | 4 ay önce | |
go.mod | 4 ay önce | |
go.sum | 4 ay önce | |
main.go | 4 ay önce |
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 https://code.osinet.fr/fgm/mongodb_duplicates/src/master/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.