Parcourir la source

fixed bson/ObjectId

tags/0.2
Xing Xing il y a 11 ans
Parent
révision
2002bb1804
1 fichiers modifiés avec 3 ajouts et 5 suppressions
  1. +3
    -5
      client/id.go

+ 3
- 5
client/id.go Voir le fichier

@@ -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


Chargement…
Annuler
Enregistrer