session copy
This commit is contained in:
parent
100eb29007
commit
702a05f405
@ -14,6 +14,10 @@ func (s *Session) Close() {
|
|||||||
s.session.Close()
|
s.session.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Session) Copy() *Session {
|
||||||
|
return &Session{session: s.session.Copy()}
|
||||||
|
}
|
||||||
|
|
||||||
func NewSession(dial string) (*Session, error) {
|
func NewSession(dial string) (*Session, error) {
|
||||||
session, err := mgo.Dial(dial)
|
session, err := mgo.Dial(dial)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user