Skip to content

Comments

fix named consts#962

Merged
gmlewis merged 2 commits intogoogle:masterfrom
cristaloleg:fix-named-consts
Aug 4, 2018
Merged

fix named consts#962
gmlewis merged 2 commits intogoogle:masterfrom
cristaloleg:fix-named-consts

Conversation

@cristaloleg
Copy link
Contributor

Found by go-critic linter via namedConst check.
From here: #960 (comment)

check-package: $GOPATH/src/github.com/google/go-github/github/activity_notifications_test.go:37:34: namedConst: use time.January instead of 1
check-package: $GOPATH/src/github.com/google/go-github/github/activity_notifications_test.go:38:34: namedConst: use time.March instead of 3
check-package: $GOPATH/src/github.com/google/go-github/github/activity_notifications_test.go:83:88: namedConst: use time.January instead of 1
check-package: $GOPATH/src/github.com/google/go-github/github/activity_notifications_test.go:101:108: namedConst: use time.January instead of 1
check-package: $GOPATH/src/github.com/google/go-github/github/gists_test.go:341:43: namedConst: use time.January instead of 1
check-package: $GOPATH/src/github.com/google/go-github/github/gists_test.go:532:41: namedConst: use time.January instead of 1
check-package: $GOPATH/src/github.com/google/go-github/github/gists_test.go:533:41: namedConst: use time.January instead of 1
check-package: $GOPATH/src/github.com/google/go-github/github/github_test.go:514:27: namedConst: use time.July instead of 7
check-package: $GOPATH/src/github.com/google/go-github/github/github_test.go:546:27: namedConst: use time.July instead of 7
check-package: $GOPATH/src/github.com/google/go-github/github/github_test.go:585:27: namedConst: use time.July instead of 7
check-package: $GOPATH/src/github.com/google/go-github/github/github_test.go:769:42: namedConst: use time.March instead of 3
check-package: $GOPATH/src/github.com/google/go-github/github/github_test.go:870:41: namedConst: use time.July instead of 7
check-package: $GOPATH/src/github.com/google/go-github/github/github_test.go:875:41: namedConst: use time.July instead of 7
check-package: $GOPATH/src/github.com/google/go-github/github/orgs_members_test.go:416:31: namedConst: use time.January instead of 1
check-package: $GOPATH/src/github.com/google/go-github/github/orgs_teams_test.go:631:31: namedConst: use time.January instead of 1
check-package: $GOPATH/src/github.com/google/go-github/github/repos_community_health_test.go:57:31: namedConst: use time.February instead of 2
check-package: $GOPATH/src/github.com/google/go-github/github/repos_stats_test.go:57:44: namedConst: use time.May instead of 5
check-package: $GOPATH/src/github.com/google/go-github/github/repos_stats_test.go:98:38: namedConst: use time.May instead of 5
check-package: $GOPATH/src/github.com/google/go-github/github/repos_stats_test.go:123:41: namedConst: use time.April instead of 4
check-package: $GOPATH/src/github.com/google/go-github/github/strings_test.go:57:30: namedConst: use time.January instead of 1
check-package: $GOPATH/src/github.com/google/go-github/github/strings_test.go:61:31: namedConst: use time.January instead of 1
check-package: $GOPATH/src/github.com/google/go-github/github/timestamp_test.go:23:34: namedConst: use time.January instead of 1

@googlebot googlebot added the cla: yes Indication that the PR author has signed a Google Contributor License Agreement. label Aug 2, 2018
}{
Reason: "dmca",
CreatedAt: &Timestamp{time.Date(2016, 3, 17, 15, 39, 46, 0, time.UTC)},
CreatedAt: &Timestamp{time.Date(2016, time.July, 17, 15, 39, 46, 0, time.UTC)},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/time.July/time.March/

I won't comment on any others... please make sure all the tests pass.
See the CONTRIBUTING.md file in the top of the repo for more details.

Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, such a silly mistake. Sorry for that :(

@gmlewis
Copy link
Collaborator

gmlewis commented Aug 4, 2018

Very nice. Thank you, @cristaloleg.
Merging.

@gmlewis gmlewis merged commit 530b7c5 into google:master Aug 4, 2018
@cristaloleg cristaloleg deleted the fix-named-consts branch August 4, 2018 06:43
gmlewis pushed a commit to gmlewis/go-github that referenced this pull request Aug 10, 2018
n1lesh pushed a commit to n1lesh/go-github that referenced this pull request Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indication that the PR author has signed a Google Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants