Skip to content

Remove redundant dereference of time.Time#960

Merged
gmlewis merged 2 commits intogoogle:masterfrom
cristaloleg:master
Jul 31, 2018
Merged

Remove redundant dereference of time.Time#960
gmlewis merged 2 commits intogoogle:masterfrom
cristaloleg:master

Conversation

@cristaloleg
Copy link
Contributor

@cristaloleg cristaloleg commented Jul 30, 2018

Found by go-critic linter.
Log:

check-package: $GOPATH/src/github.com/google/go-github/github/timestamp.go:31:3: underef: could simplify (*t).Time to t.Time
check-package: $GOPATH/src/github.com/google/go-github/github/timestamp.go:33:3: underef: could simplify (*t).Time to t.Time

If next suggestions are important too, I can make another PR(or extend current).

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 Jul 30, 2018
@gmlewis
Copy link
Collaborator

gmlewis commented Jul 31, 2018

Ah, very nice. Thank you, @cristaloleg.
Sure, feel free to make another PR.
Merging.

@gmlewis gmlewis merged commit 55e783f into google:master Jul 31, 2018
@cristaloleg cristaloleg mentioned this pull request Aug 2, 2018
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