A CLI command to find duplicate values in a MongoDB collection.
Frédéric G. MARAND 202dcf46e5 Just a tiny script. | пре 4 месеци | |
---|---|---|
.gitignore | пре 4 месеци | |
LICENSE | пре 4 месеци | |
Makefile | пре 4 месеци | |
README.md | пре 4 месеци | |
example.env | пре 4 месеци | |
go.mod | пре 4 месеци | |
go.sum | пре 4 месеци | |
main.go | пре 4 месеци |
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.