Skip to content

Commit ed4f737

Browse files
Tobias Fuhrimannmarkbates
Tobias Fuhrimann
authored andcommitted
Use gofmt -s on all files
1 parent c1c166e commit ed4f737

File tree

41 files changed

+188
-189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+188
-189
lines changed

gothic/gothic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func init() {
4545
}
4646

4747
/*
48-
BeginAuthHandler is a convienence handler for starting the authentication process.
48+
BeginAuthHandler is a convenience handler for starting the authentication process.
4949
It expects to be able to get the name of the provider from the query parameters
5050
as either "provider" or ":provider".
5151

provider_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func Test_GetProvider(t *testing.T) {
2828
a.NoError(err)
2929
a.Equal(p, provider)
3030

31-
p, err = goth.GetProvider("unknown")
31+
_, err = goth.GetProvider("unknown")
3232
a.Error(err)
3333
a.Equal(err.Error(), "no provider for unknown exists")
3434
goth.ClearProviders()

providers/amazon/amazon.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"net/http"
1111
"net/url"
1212

13+
"fmt"
1314
"github.com/markbates/goth"
1415
"golang.org/x/oauth2"
15-
"fmt"
1616
)
1717

1818
const (
@@ -36,10 +36,10 @@ type Provider struct {
3636
// create one manually.
3737
func New(clientKey, secret, callbackURL string, scopes ...string) *Provider {
3838
p := &Provider{
39-
ClientKey: clientKey,
40-
Secret: secret,
41-
CallbackURL: callbackURL,
42-
providerName: "amazon",
39+
ClientKey: clientKey,
40+
Secret: secret,
41+
CallbackURL: callbackURL,
42+
providerName: "amazon",
4343
}
4444
p.config = newConfig(p, scopes)
4545
return p

providers/bitbucket/bitbucket.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"net/http"
1010
"net/url"
1111

12+
"fmt"
1213
"github.com/markbates/goth"
1314
"golang.org/x/oauth2"
14-
"fmt"
1515
)
1616

1717
const (
@@ -26,10 +26,10 @@ const (
2626
// one manually.
2727
func New(clientKey, secret, callbackURL string, scopes ...string) *Provider {
2828
p := &Provider{
29-
ClientKey: clientKey,
30-
Secret: secret,
31-
CallbackURL: callbackURL,
32-
providerName: "bitbucket",
29+
ClientKey: clientKey,
30+
Secret: secret,
31+
CallbackURL: callbackURL,
32+
providerName: "bitbucket",
3333
}
3434
p.config = newConfig(p, scopes)
3535
return p
@@ -125,7 +125,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) {
125125

126126
func userFromReader(reader io.Reader, user *goth.User) error {
127127
u := struct {
128-
ID string `json:"uuid"`
128+
ID string `json:"uuid"`
129129
Links struct {
130130
Avatar struct {
131131
URL string `json:"href"`

providers/box/box.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"io"
88
"net/http"
99

10+
"fmt"
1011
"github.com/markbates/goth"
1112
"golang.org/x/oauth2"
12-
"fmt"
1313
)
1414

1515
const (
@@ -33,10 +33,10 @@ type Provider struct {
3333
// create one manually.
3434
func New(clientKey, secret, callbackURL string, scopes ...string) *Provider {
3535
p := &Provider{
36-
ClientKey: clientKey,
37-
Secret: secret,
38-
CallbackURL: callbackURL,
39-
providerName: "box",
36+
ClientKey: clientKey,
37+
Secret: secret,
38+
CallbackURL: callbackURL,
39+
providerName: "box",
4040
}
4141
p.config = newConfig(p, scopes)
4242
return p

providers/cloudfoundry/cf.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
"net/http"
1111
"strings"
1212

13+
"fmt"
1314
"github.com/markbates/goth"
1415
"golang.org/x/net/context"
1516
"golang.org/x/oauth2"
16-
"fmt"
1717
)
1818

1919
// Provider is the implementation of `goth.Provider` for accessing Cloud Foundry.
@@ -35,13 +35,13 @@ type Provider struct {
3535
func New(uaaURL, clientKey, secret, callbackURL string, scopes ...string) *Provider {
3636
uaaURL = strings.TrimSuffix(uaaURL, "/")
3737
p := &Provider{
38-
ClientKey: clientKey,
39-
Secret: secret,
40-
CallbackURL: callbackURL,
41-
AuthURL: uaaURL + "/oauth/authorize",
42-
TokenURL: uaaURL + "/oauth/token",
43-
UserInfoURL: uaaURL + "/userinfo",
44-
providerName: "cloudfoundry",
38+
ClientKey: clientKey,
39+
Secret: secret,
40+
CallbackURL: callbackURL,
41+
AuthURL: uaaURL + "/oauth/authorize",
42+
TokenURL: uaaURL + "/oauth/token",
43+
UserInfoURL: uaaURL + "/userinfo",
44+
providerName: "cloudfoundry",
4545
}
4646
p.config = newConfig(p, scopes)
4747
return p

providers/dailymotion/dailymotion.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"net/http"
1111
"net/url"
1212

13+
"fmt"
1314
"github.com/markbates/goth"
1415
"golang.org/x/oauth2"
15-
"fmt"
1616
)
1717

1818
const (
@@ -36,10 +36,10 @@ type Provider struct {
3636
// create one manually.
3737
func New(clientKey string, secret string, callbackURL string, scopes ...string) *Provider {
3838
p := &Provider{
39-
ClientKey: clientKey,
40-
Secret: secret,
41-
CallbackURL: callbackURL,
42-
providerName: "dailymotion",
39+
ClientKey: clientKey,
40+
Secret: secret,
41+
CallbackURL: callbackURL,
42+
providerName: "dailymotion",
4343
}
4444
p.config = newConfig(p, scopes)
4545
return p

providers/deezer/deezer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111
"net/http"
1212
"net/url"
1313

14+
"fmt"
1415
"github.com/markbates/goth"
1516
"golang.org/x/oauth2"
16-
"fmt"
1717
)
1818

1919
const (
@@ -37,10 +37,10 @@ type Provider struct {
3737
// create one manually.
3838
func New(clientKey, secret, callbackURL string, scopes ...string) *Provider {
3939
p := &Provider{
40-
ClientKey: clientKey,
41-
Secret: secret,
42-
CallbackURL: callbackURL,
43-
providerName: "deezer",
40+
ClientKey: clientKey,
41+
Secret: secret,
42+
CallbackURL: callbackURL,
43+
providerName: "deezer",
4444
}
4545
p.config = newConfig(p, scopes)
4646
return p

providers/digitalocean/digitalocean.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"io/ioutil"
1010
"net/http"
1111

12+
"fmt"
1213
"github.com/markbates/goth"
1314
"golang.org/x/oauth2"
14-
"fmt"
1515
)
1616

1717
const (
@@ -25,10 +25,10 @@ const (
2525
// one manually.
2626
func New(clientKey, secret, callbackURL string, scopes ...string) *Provider {
2727
p := &Provider{
28-
ClientKey: clientKey,
29-
Secret: secret,
30-
CallbackURL: callbackURL,
31-
providerName: "digitalocean",
28+
ClientKey: clientKey,
29+
Secret: secret,
30+
CallbackURL: callbackURL,
31+
providerName: "digitalocean",
3232
}
3333

3434
p.config = newConfig(p, scopes)

providers/discord/discord.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"github.com/markbates/goth"
1212
"golang.org/x/oauth2"
1313

14-
"net/http"
1514
"fmt"
15+
"net/http"
1616
)
1717

1818
const (
@@ -45,10 +45,10 @@ const (
4545
// one manually.
4646
func New(clientKey string, secret string, callbackURL string, scopes ...string) *Provider {
4747
p := &Provider{
48-
ClientKey: clientKey,
49-
Secret: secret,
50-
CallbackURL: callbackURL,
51-
providerName: "discord",
48+
ClientKey: clientKey,
49+
Secret: secret,
50+
CallbackURL: callbackURL,
51+
providerName: "discord",
5252
}
5353
p.config = newConfig(p, scopes)
5454
return p

providers/dropbox/dropbox.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"net/http"
99
"strings"
1010

11+
"fmt"
1112
"github.com/markbates/goth"
1213
"golang.org/x/oauth2"
13-
"fmt"
1414
)
1515

1616
const (
@@ -40,10 +40,10 @@ type Session struct {
4040
// create one manually.
4141
func New(clientKey, secret, callbackURL string, scopes ...string) *Provider {
4242
p := &Provider{
43-
ClientKey: clientKey,
44-
Secret: secret,
45-
CallbackURL: callbackURL,
46-
providerName: "dropbox",
43+
ClientKey: clientKey,
44+
Secret: secret,
45+
CallbackURL: callbackURL,
46+
providerName: "dropbox",
4747
}
4848
p.config = newConfig(p, scopes)
4949
return p
@@ -161,7 +161,7 @@ func newConfig(p *Provider, scopes []string) *oauth2.Config {
161161

162162
func userFromReader(r io.Reader, user *goth.User) error {
163163
u := struct {
164-
Name string `json:"display_name"`
164+
Name string `json:"display_name"`
165165
NameDetails struct {
166166
NickName string `json:"familiar_name"`
167167
} `json:"name_details"`

providers/facebook/facebook.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import (
1111
"net/http"
1212
"net/url"
1313

14-
"github.com/markbates/goth"
15-
"golang.org/x/oauth2"
16-
"fmt"
1714
"crypto/hmac"
1815
"crypto/sha256"
1916
"encoding/hex"
17+
"fmt"
18+
"github.com/markbates/goth"
19+
"golang.org/x/oauth2"
2020
)
2121

2222
const (
@@ -30,10 +30,10 @@ const (
3030
// one manually.
3131
func New(clientKey, secret, callbackURL string, scopes ...string) *Provider {
3232
p := &Provider{
33-
ClientKey: clientKey,
34-
Secret: secret,
35-
CallbackURL: callbackURL,
36-
providerName: "facebook",
33+
ClientKey: clientKey,
34+
Secret: secret,
35+
CallbackURL: callbackURL,
36+
providerName: "facebook",
3737
}
3838
p.config = newConfig(p, scopes)
3939
return p
@@ -129,7 +129,7 @@ func userFromReader(reader io.Reader, user *goth.User) error {
129129
FirstName string `json:"first_name"`
130130
LastName string `json:"last_name"`
131131
Link string `json:"link"`
132-
Picture struct {
132+
Picture struct {
133133
Data struct {
134134
URL string `json:"url"`
135135
} `json:"data"`

providers/fitbit/fitbit.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"io"
88
"net/http"
99

10+
"fmt"
1011
"github.com/markbates/goth"
1112
"golang.org/x/oauth2"
12-
"fmt"
1313
)
1414

1515
const (
@@ -44,10 +44,10 @@ const (
4444
// one manually.
4545
func New(clientKey, secret, callbackURL string, scopes ...string) *Provider {
4646
p := &Provider{
47-
ClientKey: clientKey,
48-
Secret: secret,
49-
CallbackURL: callbackURL,
50-
providerName: "fitbit",
47+
ClientKey: clientKey,
48+
Secret: secret,
49+
CallbackURL: callbackURL,
50+
providerName: "fitbit",
5151
}
5252
p.config = newConfig(p, scopes)
5353
return p

providers/gitlab/gitlab.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111
"net/url"
1212
"strconv"
1313

14+
"fmt"
1415
"github.com/markbates/goth"
1516
"golang.org/x/oauth2"
16-
"fmt"
1717
)
1818

1919
// These vars define the Authentication, Token, and Profile URLS for Gitlab. If

providers/gplus/gplus.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111
"net/url"
1212
"strings"
1313

14+
"fmt"
1415
"github.com/markbates/goth"
1516
"golang.org/x/oauth2"
16-
"fmt"
1717
)
1818

1919
const (
@@ -27,10 +27,10 @@ const (
2727
// one manually.
2828
func New(clientKey, secret, callbackURL string, scopes ...string) *Provider {
2929
p := &Provider{
30-
ClientKey: clientKey,
31-
Secret: secret,
32-
CallbackURL: callbackURL,
33-
providerName: "gplus",
30+
ClientKey: clientKey,
31+
Secret: secret,
32+
CallbackURL: callbackURL,
33+
providerName: "gplus",
3434
}
3535
p.config = newConfig(p, scopes)
3636
return p

providers/heroku/heroku.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"io"
88
"net/http"
99

10+
"fmt"
1011
"github.com/markbates/goth"
1112
"golang.org/x/oauth2"
12-
"fmt"
1313
)
1414

1515
const (

0 commit comments

Comments
 (0)