// GetOneRandomWorld return one random World struct
GetOneRandomWorld return one random World struct
// GetOneRandomWorld return one random World struct
func (m Mongo) GetOneRandomWorld(w *World) error {
	var err error
	queryID := rand.Intn(worldsCount) + 1
	filter := bson.M{"_id": queryID}
	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
	defer cancel()
	if err = m.worlds.FindOne(ctx, filter).Decode(w); err != nil {
		err = fmt.Errorf("error scanning world row with ID %d: %s", queryID, err)
	}
	return err
}
func ( m Mongo ) GetOneRandomWorld ( w * World ) error { var err error queryID := rand . Intn ( worldsCount ) + 1 filter := bson . M { " " : queryID } ctx , cancel := context . WithTimeout ( context . Background ( ) , 10 * time . Second ) defer cancel ( ) if err = m . worlds . FindOne ( ctx , filter ) . Decode ( w ) ; err != nil { err = fmt . Errorf ( " " , queryID , err ) } return err }
GetOneRandomWorld return one random World struct
GetOneRandomWorld return one random World struct