Pārlūkot izejas kodu

fixed bson/ObjectId

tags/0.2
Xing Xing pirms 11 gadiem
vecāks
revīzija
2002bb1804
1 mainītis faili ar 3 papildinājumiem un 5 dzēšanām
  1. +3
    -5
      client/id.go

+ 3
- 5
client/id.go Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt