Explorar el Código

fixed bson/ObjectId

tags/0.2
Xing Xing hace 10 años
padre
commit
2002bb1804
Se han modificado 1 ficheros con 3 adiciones y 5 borrados
  1. +3
    -5
      client/id.go

+ 3
- 5
client/id.go Ver fichero

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


Cargando…
Cancelar
Guardar