Sfoglia il codice sorgente

fixed bson/ObjectId

tags/0.2
Xing Xing 11 anni fa
parent
commit
2002bb1804
1 ha cambiato i file con 3 aggiunte e 5 eliminazioni
  1. +3
    -5
      client/id.go

+ 3
- 5
client/id.go Vedi File

@@ -11,16 +11,14 @@ type IdGenerator interface {
}

// ObjectId
type objectId struct {
bson.ObjectId
}
type objectId struct {}

func (id *objectId) Id() string {
return id.Hex()
return bson.NewObjectId().Hex()
}

func NewObjectId() IdGenerator {
return &objectId{bson.NewObjectId()}
return &objectId{}
}

// AutoIncId


Loading…
Annulla
Salva