Skip to content

Commit e31b73c

Browse files
committed
Fix some typos and warnings
Signed-off-by: Javi Fontan <[email protected]>
1 parent 4ff9650 commit e31b73c

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

commits.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ func (commitsTable) Schema() sql.Schema {
2828
{Name: "author_name", Type: sql.Text, Nullable: false},
2929
{Name: "author_email", Type: sql.Text, Nullable: false},
3030
{Name: "author_when", Type: sql.Timestamp, Nullable: false},
31-
{Name: "comitter_name", Type: sql.Text, Nullable: false},
32-
{Name: "comitter_email", Type: sql.Text, Nullable: false},
33-
{Name: "comitter_when", Type: sql.Timestamp, Nullable: false},
31+
{Name: "committer_name", Type: sql.Text, Nullable: false},
32+
{Name: "committer_email", Type: sql.Text, Nullable: false},
33+
{Name: "committer_when", Type: sql.Timestamp, Nullable: false},
3434
{Name: "message", Type: sql.Text, Nullable: false},
3535
}
3636
}

database.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const (
1515
remotesTableName = "remotes"
1616
)
1717

18+
// Database holds all git repository tables
1819
type Database struct {
1920
name string
2021
cr sql.Table
@@ -26,6 +27,8 @@ type Database struct {
2627
rmr sql.Table
2728
}
2829

30+
// NewDatabase creates a new Database structure and initializes its
31+
// tables with the given pool
2932
func NewDatabase(name string, pool *RepositoryPool) sql.Database {
3033
return &Database{
3134
name: name,
@@ -39,10 +42,12 @@ func NewDatabase(name string, pool *RepositoryPool) sql.Database {
3942
}
4043
}
4144

45+
// Name returns the name of the database
4246
func (d *Database) Name() string {
4347
return d.name
4448
}
4549

50+
// Tables returns a map with all initialized tables
4651
func (d *Database) Tables() map[string]sql.Table {
4752
return map[string]sql.Table{
4853
commitsTableName: d.cr,

remotes.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ func (remotesTable) Children() []sql.Node {
5959
}
6060

6161
type remotesIter struct {
62-
repository_id string
63-
remotes []*git.Remote
64-
conf *gitconfig.RemoteConfig
65-
remotePos int
66-
urlPos int
62+
repositoryID string
63+
remotes []*git.Remote
64+
conf *gitconfig.RemoteConfig
65+
remotePos int
66+
urlPos int
6767
}
6868

6969
func (i *remotesIter) NewIterator(
@@ -75,10 +75,10 @@ func (i *remotesIter) NewIterator(
7575
}
7676

7777
return &remotesIter{
78-
repository_id: repo.ID,
79-
remotes: remotes,
80-
remotePos: 0,
81-
urlPos: 0}, nil
78+
repositoryID: repo.ID,
79+
remotes: remotes,
80+
remotePos: 0,
81+
urlPos: 0}, nil
8282
}
8383

8484
func (i *remotesIter) Next() (sql.Row, error) {
@@ -101,7 +101,7 @@ func (i *remotesIter) Next() (sql.Row, error) {
101101
}
102102

103103
row := sql.NewRow(
104-
i.repository_id,
104+
i.repositoryID,
105105
config.Name,
106106
config.URLs[i.urlPos],
107107
config.URLs[i.urlPos],

0 commit comments

Comments
 (0)