File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ func initConfig() {
5959// Session holds the mongodb session for database access
6060var session * mgo.Session
6161
62- // Get database session
62+ // GetSession gets database session
6363func GetSession () * mgo.Session {
6464 if session == nil {
6565 var err error
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ func (c *Context) Close() {
1616 c .MongoSession .Close ()
1717}
1818
19- // Returns mgo.collection for the given name
19+ // DbCollection returns mgo.collection for the given name
2020func (c * Context ) DbCollection (name string ) * mgo.Collection {
2121 return c .MongoSession .DB (common .AppConfig .Database ).C (name )
2222}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ func initConfig() {
5959// Session holds the mongodb session for database access
6060var session * mgo.Session
6161
62- // Get database session
62+ // GetSession gets database session
6363func GetSession () * mgo.Session {
6464 if session == nil {
6565 var err error
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ func (c *Context) Close() {
1616 c .MongoSession .Close ()
1717}
1818
19- // Returns mgo.collection for the given name
19+ // DbCollection returns mgo.collection for the given name
2020func (c * Context ) DbCollection (name string ) * mgo.Collection {
2121 return c .MongoSession .DB (common .AppConfig .Database ).C (name )
2222}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ func initConfig() {
5959// Session holds the mongodb session for database access
6060var session * mgo.Session
6161
62- // Get database session
62+ // GetSession gets database session
6363func GetSession () * mgo.Session {
6464 if session == nil {
6565 var err error
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ func (c *Context) Close() {
1616 c .MongoSession .Close ()
1717}
1818
19- // Returns mgo.collection for the given name
19+ // DbCollection returns mgo.collection for the given name
2020func (c * Context ) DbCollection (name string ) * mgo.Collection {
2121 return c .MongoSession .DB (common .AppConfig .Database ).C (name )
2222}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ func initConfig() {
5959// Session holds the mongodb session for database access
6060var session * mgo.Session
6161
62- // Get database session
62+ // GetSession gets database session
6363func GetSession () * mgo.Session {
6464 if session == nil {
6565 var err error
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ func (c *Context) Close() {
1616 c .MongoSession .Close ()
1717}
1818
19- // Returns mgo.collection for the given name
19+ // DbCollection returns mgo.collection for the given name
2020func (c * Context ) DbCollection (name string ) * mgo.Collection {
2121 return c .MongoSession .DB (common .AppConfig .Database ).C (name )
2222}
You can’t perform that action at this time.
0 commit comments