@@ -9,11 +9,11 @@ import (
9
9
"github.com/mattn/go-sqlite3"
10
10
)
11
11
12
- type GithubRepo struct {
12
+ type githubRepo struct {
13
13
ID int `json:"id"`
14
14
FullName string `json:"full_name"`
15
15
Description string `json:"description"`
16
- HtmlURL string `json:"html_url"`
16
+ HTMLURL string `json:"html_url"`
17
17
}
18
18
19
19
type githubModule struct {
@@ -40,7 +40,7 @@ func (m *githubModule) Connect(c *sqlite3.SQLiteConn, args []string) (sqlite3.VT
40
40
func (m * githubModule ) DestroyModule () {}
41
41
42
42
type ghRepoTable struct {
43
- repos []GithubRepo
43
+ repos []githubRepo
44
44
}
45
45
46
46
func (v * ghRepoTable ) Open () (sqlite3.VTabCursor , error ) {
@@ -55,7 +55,7 @@ func (v *ghRepoTable) Open() (sqlite3.VTabCursor, error) {
55
55
return nil , err
56
56
}
57
57
58
- repos := make ([] GithubRepo , 0 )
58
+ var repos [] githubRepo
59
59
if err := json .Unmarshal (body , & repos ); err != nil {
60
60
return nil , err
61
61
}
@@ -71,7 +71,7 @@ func (v *ghRepoTable) Destroy() error { return nil }
71
71
72
72
type ghRepoCursor struct {
73
73
index int
74
- repos []GithubRepo
74
+ repos []githubRepo
75
75
}
76
76
77
77
func (vc * ghRepoCursor ) Column (c * sqlite3.SQLiteContext , col int ) error {
@@ -83,7 +83,7 @@ func (vc *ghRepoCursor) Column(c *sqlite3.SQLiteContext, col int) error {
83
83
case 2 :
84
84
c .ResultText (vc .repos [vc .index ].Description )
85
85
case 3 :
86
- c .ResultText (vc .repos [vc .index ].HtmlURL )
86
+ c .ResultText (vc .repos [vc .index ].HTMLURL )
87
87
}
88
88
return nil
89
89
}
0 commit comments