@@ -21,7 +21,7 @@ func NewClient() (*Client, error) {
2121 return nil , err
2222 }
2323 fmt .Println ("Done" )
24-
24+
2525 return & Client {client : client }, nil
2626}
2727
@@ -89,9 +89,9 @@ func (c *Client) getCommits(username, repo string, startDate, endDate time.Time)
8989 var activities []types.GitHubActivity
9090
9191 // Search for commits by author
92- query := fmt .Sprintf ("author:%s committer-date:%s..%s" ,
92+ query := fmt .Sprintf ("author:%s committer-date:%s..%s" ,
9393 username , startDate .Format ("2006-01-02" ), endDate .Format ("2006-01-02" ))
94-
94+
9595 if repo != "" {
9696 query += fmt .Sprintf (" repo:%s" , repo )
9797 }
@@ -139,19 +139,19 @@ func (c *Client) getPullRequests(username, repo string, startDate, endDate time.
139139 var activities []types.GitHubActivity
140140
141141 // Search for pull requests
142- query := fmt .Sprintf ("author:%s created:%s..%s" ,
142+ query := fmt .Sprintf ("author:%s created:%s..%s" ,
143143 username , startDate .Format ("2006-01-02" ), endDate .Format ("2006-01-02" ))
144-
144+
145145 if repo != "" {
146146 query += fmt .Sprintf (" repo:%s" , repo )
147147 }
148148
149149 var searchResult struct {
150150 Items []struct {
151- Number int `json:"number"`
152- Title string `json:"title"`
153- Body string `json:"body"`
154- State string `json:"state"`
151+ Number int `json:"number"`
152+ Title string `json:"title"`
153+ Body string `json:"body"`
154+ State string `json:"state"`
155155 Repository struct {
156156 FullName string `json:"full_name"`
157157 } `json:"repository"`
@@ -184,19 +184,19 @@ func (c *Client) getIssues(username, repo string, startDate, endDate time.Time)
184184 var activities []types.GitHubActivity
185185
186186 // Search for issues created by user
187- query := fmt .Sprintf ("author:%s created:%s..%s" ,
187+ query := fmt .Sprintf ("author:%s created:%s..%s" ,
188188 username , startDate .Format ("2006-01-02" ), endDate .Format ("2006-01-02" ))
189-
189+
190190 if repo != "" {
191191 query += fmt .Sprintf (" repo:%s" , repo )
192192 }
193193
194194 var searchResult struct {
195195 Items []struct {
196- Number int `json:"number"`
197- Title string `json:"title"`
198- Body string `json:"body"`
199- State string `json:"state"`
196+ Number int `json:"number"`
197+ Title string `json:"title"`
198+ Body string `json:"body"`
199+ State string `json:"state"`
200200 Repository struct {
201201 FullName string `json:"full_name"`
202202 } `json:"repository"`
@@ -229,13 +229,13 @@ func (c *Client) getReviews(username string, startDate, endDate time.Time) ([]ty
229229 var activities []types.GitHubActivity
230230
231231 // Search for pull requests reviewed by user
232- query := fmt .Sprintf ("reviewed-by:%s created:%s..%s" ,
232+ query := fmt .Sprintf ("reviewed-by:%s created:%s..%s" ,
233233 username , startDate .Format ("2006-01-02" ), endDate .Format ("2006-01-02" ))
234234
235235 var searchResult struct {
236236 Items []struct {
237- Number int `json:"number"`
238- Title string `json:"title"`
237+ Number int `json:"number"`
238+ Title string `json:"title"`
239239 Repository struct {
240240 FullName string `json:"full_name"`
241241 } `json:"repository"`
0 commit comments