Skip to content

Commit f0c3673

Browse files
author
Manuel Morejón
authored
Merge pull request #4 from CodeLingoBot/rewrite
Fix function comments based on best practices from Effective Go
2 parents 7d86818 + cfc0ffe commit f0c3673

8 files changed

Lines changed: 8 additions & 8 deletions

File tree

bookings/common/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func initConfig() {
5959
// Session holds the mongodb session for database access
6060
var session *mgo.Session
6161

62-
// Get database session
62+
// GetSession gets database session
6363
func GetSession() *mgo.Session {
6464
if session == nil {
6565
var err error

bookings/controllers/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
2020
func (c *Context) DbCollection(name string) *mgo.Collection {
2121
return c.MongoSession.DB(common.AppConfig.Database).C(name)
2222
}

movies/common/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func initConfig() {
5959
// Session holds the mongodb session for database access
6060
var session *mgo.Session
6161

62-
// Get database session
62+
// GetSession gets database session
6363
func GetSession() *mgo.Session {
6464
if session == nil {
6565
var err error

movies/controllers/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
2020
func (c *Context) DbCollection(name string) *mgo.Collection {
2121
return c.MongoSession.DB(common.AppConfig.Database).C(name)
2222
}

showtimes/common/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func initConfig() {
5959
// Session holds the mongodb session for database access
6060
var session *mgo.Session
6161

62-
// Get database session
62+
// GetSession gets database session
6363
func GetSession() *mgo.Session {
6464
if session == nil {
6565
var err error

showtimes/controllers/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
2020
func (c *Context) DbCollection(name string) *mgo.Collection {
2121
return c.MongoSession.DB(common.AppConfig.Database).C(name)
2222
}

users/common/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func initConfig() {
5959
// Session holds the mongodb session for database access
6060
var session *mgo.Session
6161

62-
// Get database session
62+
// GetSession gets database session
6363
func GetSession() *mgo.Session {
6464
if session == nil {
6565
var err error

users/controllers/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
2020
func (c *Context) DbCollection(name string) *mgo.Collection {
2121
return c.MongoSession.DB(common.AppConfig.Database).C(name)
2222
}

0 commit comments

Comments
 (0)