I'm trying to shard a collection using mgo library in Go. Looks like I can't figure out to run commands using Session.Run call. Here is my code:
if err := session.DB("admin").Run(bson.D{{"shardCollection", "visits.visits-2016-05"}, {"uuid", "1"}}, &result); err != nil {
panic(err)
} else {
fmt.Println(result)
}
I've tried several variants of passing key parameter, but I'm always getting no shard key
error
What am I doing wrong here?