Last active
December 29, 2018 21:31
-
-
Save Hasstrup/92d37da41181faf57bd962fa9f97e9a6 to your computer and use it in GitHub Desktop.
Index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "flag" | |
var ( | |
cmd = flag.String("cmd", "", "list or add?") | |
address = flag.String("address", "", "mongodb address to connect to") | |
database = flag.String("db", "", "The name of the database to connect to") | |
collection = flag.String("collection", "", "The collection (in the db) to connect to") | |
key = flag.String("field", "", "The field you'd like to place an index on") | |
unique = flag.Bool("unique", false, "Would you like the index to be unique?") | |
value = flag.Int("type", 1, "would you like the index to be ascending (1) or descending (-1)?") | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment