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