Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix function comments based on best practices from Effective Go #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion providers/facebook/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (u *User) AuthCode() string {
return u.Data().Get(common.UserKeyAuthCode).Str()
}

// GetValue gets any User field by name.
// Data gets any User field by name.
func (u *User) Data() objx.Map {
return u.data
}
Expand Down
2 changes: 1 addition & 1 deletion providers/github/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (u *User) AuthCode() string {
return u.Data().Get(common.UserKeyAuthCode).Str()
}

// GetValue gets any User field by name.
// Data gets any User field by name.
func (u *User) Data() objx.Map {
return u.data
}
Expand Down
2 changes: 1 addition & 1 deletion providers/gitlab/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (u *User) AuthCode() string {
return u.Data().Get(common.UserKeyAuthCode).Str()
}

// GetValue gets any User field by name.
// Data gets any User field by name.
func (u *User) Data() objx.Map {
return u.data
}
Expand Down
2 changes: 1 addition & 1 deletion providers/google/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func New(clientId, clientSecret, redirectUrl string) *GoogleProvider {
return p
}

// TipperFactory gets an OAuth2TripperFactory
// TripperFactory gets an OAuth2TripperFactory
func (provider *GoogleProvider) TripperFactory() common.TripperFactory {

if provider.tripperFactory == nil {
Expand Down
2 changes: 1 addition & 1 deletion providers/google/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (u *User) AuthCode() string {
return u.Data().Get(common.UserKeyAuthCode).Str()
}

// GetValue gets any User field by name.
// Data gets any User field by name.
func (u *User) Data() objx.Map {
return u.data
}
Expand Down
2 changes: 1 addition & 1 deletion providers/heroku/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (u *User) AuthCode() string {
return u.Data().Get(common.UserKeyAuthCode).Str()
}

// GetValue gets any User field by name.
// Data gets any User field by name.
func (u *User) Data() objx.Map {
return u.data
}
Expand Down
4 changes: 2 additions & 2 deletions providers/instagram/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (u *User) Nickname() string {

}

// Instagram API doesn't return email
// Email: Instagram API doesn't return email
func (u *User) Email() string {
return ""
}
Expand Down Expand Up @@ -75,7 +75,7 @@ func (u *User) AuthCode() string {
return u.Data().Get(common.UserKeyAuthCode).Str()
}

// GetValue gets any User field by name.
// Data gets any User field by name.
func (u *User) Data() objx.Map {
return u.data
}
Expand Down
2 changes: 1 addition & 1 deletion providers/soundcloud/soundcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func New(clientId, clientSecret, redirectUrl string) *SoundcloudProvider {
return p
}

// TipperFactory gets an OAuth2TripperFactory
// TripperFactory gets an OAuth2TripperFactory
func (provider *SoundcloudProvider) TripperFactory() common.TripperFactory {

if provider.tripperFactory == nil {
Expand Down
2 changes: 1 addition & 1 deletion providers/soundcloud/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (u *User) AuthCode() string {
return u.Data().Get(common.UserKeyAuthCode).Str()
}

// GetValue gets any User field by name.
// Data gets any User field by name.
func (u *User) Data() objx.Map {
return u.data
}
Expand Down
2 changes: 1 addition & 1 deletion providers/spotify/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (u *User) AuthCode() string {
return u.Data().Get(common.UserKeyAuthCode).Str()
}

// GetValue gets any User field by name.
// Data gets any User field by name.
func (u *User) Data() objx.Map {
return u.data
}
Expand Down
4 changes: 2 additions & 2 deletions providers/uber/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (u *User) Nickname() string {

}

// Uber API doesn't return email
// Email: Uber API doesn't return email
func (u *User) Email() string {
return ""
}
Expand Down Expand Up @@ -76,7 +76,7 @@ func (u *User) AuthCode() string {
return u.Data().Get(common.UserKeyAuthCode).Str()
}

// GetValue gets any User field by name.
// Data gets any User field by name.
func (u *User) Data() objx.Map {
return u.data
}
Expand Down