Skip to content

Commit 05acc2d

Browse files
authored
Merge pull request #3 from iamrare/update-go
Update go
2 parents 5b1231b + 144747d commit 05acc2d

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

exporter/metrics.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ func AddMetrics() map[string]*prometheus.Desc {
1919
[]string{"repo", "user", "private", "fork", "archived", "license", "language"}, nil,
2020
)
2121
APIMetrics["PullRequestCount"] = prometheus.NewDesc(
22-
prometheus.BuildFQName("github", "repo", "pull_request_count"),
23-
"Total number of pull requests for given repository",
24-
[]string{}, nil,
22+
prometheus.BuildFQName("github", "repo", "pull_request_count"),
23+
"Total number of pull requests for given repository",
24+
[]string{}, nil,
2525
)
2626
APIMetrics["Watchers"] = prometheus.NewDesc(
2727
prometheus.BuildFQName("github", "repo", "watchers"),

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/infinityworks/github-exporter
22

3-
go 1.12
3+
go 1.14
44

55
require (
66
github.com/fatih/structs v1.1.0

test/github_exporter_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ func githubReleases() *apitest.Mock {
108108
}
109109

110110
func githubPulls() *apitest.Mock {
111-
return apitest.NewMock().
112-
Get("https://api.github.com/repos/myOrg/myRepo/pulls").
113-
Header("Authorization", "token 12345").
114-
RespondWith().
115-
Times(2).
116-
Body(readFile("testdata/pulls_response.json")).
117-
Status(http.StatusOK).
118-
End()
111+
return apitest.NewMock().
112+
Get("https://api.github.com/repos/myOrg/myRepo/pulls").
113+
Header("Authorization", "token 12345").
114+
RespondWith().
115+
Times(2).
116+
Body(readFile("testdata/pulls_response.json")).
117+
Status(http.StatusOK).
118+
End()
119119
}
120120

121121
func readFile(path string) string {

0 commit comments

Comments
 (0)