Skip to content

Commit 8b8b5f4

Browse files
committed
imports according to goimport and code style
1 parent 94c8a48 commit 8b8b5f4

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

models/login_source.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,18 @@ import (
1111
"fmt"
1212
"net/smtp"
1313
"net/textproto"
14+
"sort"
1415
"strings"
1516
"time"
1617

18+
"code.gitea.io/gitea/modules/auth/ldap"
19+
"code.gitea.io/gitea/modules/auth/oauth2"
20+
"code.gitea.io/gitea/modules/auth/pam"
21+
"code.gitea.io/gitea/modules/log"
1722
"github.com/Unknwon/com"
1823
"github.com/go-macaron/binding"
1924
"github.com/go-xorm/core"
2025
"github.com/go-xorm/xorm"
21-
22-
"code.gitea.io/gitea/modules/auth/ldap"
23-
"code.gitea.io/gitea/modules/auth/pam"
24-
"code.gitea.io/gitea/modules/log"
25-
"code.gitea.io/gitea/modules/auth/oauth2"
26-
"sort"
2726
)
2827

2928
// LoginType represents an login type.
@@ -763,11 +762,12 @@ func InitOAuth2() {
763762
oauth2.RegisterProvider(source.Name, oAuth2Config.Provider, oAuth2Config.ClientID, oAuth2Config.ClientSecret, oAuth2Config.OpenIDConnectAutoDiscoveryURL)
764763
}
765764
}
765+
766766
// wrapOpenIDConnectInitializeError is used to wrap the error but this cannot be done in modules/auth/oauth2
767767
// inside oauth2: import cycle not allowed models -> modules/auth/oauth2 -> models
768768
func wrapOpenIDConnectInitializeError(err error, providerName string, oAuth2Config *OAuth2Config) error {
769769
if err != nil && "openidConnect" == oAuth2Config.Provider {
770-
err = ErrOpenIDConnectInitialize{ProviderName:providerName,OpenIDConnectAutoDiscoveryURL:oAuth2Config.OpenIDConnectAutoDiscoveryURL,Cause:err}
770+
err = ErrOpenIDConnectInitialize{ProviderName: providerName, OpenIDConnectAutoDiscoveryURL: oAuth2Config.OpenIDConnectAutoDiscoveryURL, Cause: err}
771771
}
772772
return err
773-
}
773+
}

modules/auth/oauth2/oauth2.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@
55
package oauth2
66

77
import (
8-
"code.gitea.io/gitea/modules/setting"
8+
"math"
9+
"net/http"
10+
"os"
11+
"path/filepath"
12+
913
"code.gitea.io/gitea/modules/log"
14+
"code.gitea.io/gitea/modules/setting"
1015
"github.com/gorilla/sessions"
1116
"github.com/markbates/goth"
1217
"github.com/markbates/goth/gothic"
13-
"net/http"
14-
"os"
15-
"github.com/satori/go.uuid"
16-
"path/filepath"
17-
"github.com/markbates/goth/providers/github"
18-
"github.com/markbates/goth/providers/gplus"
19-
"github.com/markbates/goth/providers/gitlab"
2018
"github.com/markbates/goth/providers/bitbucket"
21-
"github.com/markbates/goth/providers/twitter"
22-
"github.com/markbates/goth/providers/facebook"
2319
"github.com/markbates/goth/providers/dropbox"
20+
"github.com/markbates/goth/providers/facebook"
21+
"github.com/markbates/goth/providers/github"
22+
"github.com/markbates/goth/providers/gitlab"
23+
"github.com/markbates/goth/providers/gplus"
2424
"github.com/markbates/goth/providers/openidConnect"
25-
"math"
25+
"github.com/markbates/goth/providers/twitter"
26+
"github.com/satori/go.uuid"
2627
)
2728

2829
var (

0 commit comments

Comments
 (0)