Skip to content

Commit f9e79c0

Browse files
committed
golint
1 parent a9d61d5 commit f9e79c0

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

_example/vtable/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ func main() {
3131
}
3232
defer rows.Close()
3333
for rows.Next() {
34-
var id, full_name, description, html_url string
35-
rows.Scan(&id, &full_name, &description, &html_url)
36-
fmt.Printf("%s: %s\n\t%s\n\t%s\n\n", id, full_name, description, html_url)
34+
var id, fullName, description, htmlURL string
35+
rows.Scan(&id, &fullName, &description, &htmlURL)
36+
fmt.Printf("%s: %s\n\t%s\n\t%s\n\n", id, fullName, description, htmlURL)
3737
}
3838
}

_example/vtable/vtable.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import (
99
"github.com/mattn/go-sqlite3"
1010
)
1111

12-
type GithubRepo struct {
12+
type githubRepo struct {
1313
ID int `json:"id"`
1414
FullName string `json:"full_name"`
1515
Description string `json:"description"`
16-
HtmlURL string `json:"html_url"`
16+
HTMLURL string `json:"html_url"`
1717
}
1818

1919
type githubModule struct {
@@ -40,7 +40,7 @@ func (m *githubModule) Connect(c *sqlite3.SQLiteConn, args []string) (sqlite3.VT
4040
func (m *githubModule) DestroyModule() {}
4141

4242
type ghRepoTable struct {
43-
repos []GithubRepo
43+
repos []githubRepo
4444
}
4545

4646
func (v *ghRepoTable) Open() (sqlite3.VTabCursor, error) {
@@ -55,7 +55,7 @@ func (v *ghRepoTable) Open() (sqlite3.VTabCursor, error) {
5555
return nil, err
5656
}
5757

58-
repos := make([]GithubRepo, 0)
58+
var repos []githubRepo
5959
if err := json.Unmarshal(body, &repos); err != nil {
6060
return nil, err
6161
}
@@ -71,7 +71,7 @@ func (v *ghRepoTable) Destroy() error { return nil }
7171

7272
type ghRepoCursor struct {
7373
index int
74-
repos []GithubRepo
74+
repos []githubRepo
7575
}
7676

7777
func (vc *ghRepoCursor) Column(c *sqlite3.SQLiteContext, col int) error {
@@ -83,7 +83,7 @@ func (vc *ghRepoCursor) Column(c *sqlite3.SQLiteContext, col int) error {
8383
case 2:
8484
c.ResultText(vc.repos[vc.index].Description)
8585
case 3:
86-
c.ResultText(vc.repos[vc.index].HtmlURL)
86+
c.ResultText(vc.repos[vc.index].HTMLURL)
8787
}
8888
return nil
8989
}

0 commit comments

Comments
 (0)