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