Académique Documents
Professionnel Documents
Culture Documents
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
// var query bson.M
now := time.Now()
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}
package main
import (
"fmt"
"time"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
s, _ := mgo.Dial("localhost:27017")
s.SetMode(mgo.Monotonic, true)
db := s.DB("new")
index := mgo.Index{
Key: []string{"url"},
Unique: true,
DropDups: true,
Background: true,
Sparse: true,
}
c := db.C("c2")
c.EnsureIndex(index)
}
fmt.Println("inserted")
}