Skip to content

gofmt #1662

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

Merged
merged 1 commit into from
May 4, 2017
Merged

gofmt #1662

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
4 changes: 2 additions & 2 deletions models/error_oauth2.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import "fmt"
// ErrOpenIDConnectInitialize represents a "OpenIDConnectInitialize" kind of error.
type ErrOpenIDConnectInitialize struct {
OpenIDConnectAutoDiscoveryURL string
ProviderName string
Cause error
ProviderName string
Cause error
}

// IsErrOpenIDConnectInitialize checks if an error is a ExternalLoginUserAlreadyExist.
Expand Down
2 changes: 1 addition & 1 deletion models/login_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,4 +685,4 @@ func UserSignIn(username, password string) (*User, error) {
}

return nil, ErrUserNotExist{user.ID, user.Name, 0}
}
}
12 changes: 6 additions & 6 deletions models/oauth2.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ package models

import (
"sort"

"code.gitea.io/gitea/modules/auth/oauth2"
)

// OAuth2Provider describes the display values of a single OAuth2 provider
type OAuth2Provider struct {
Name string
DisplayName string
Image string
CustomURLMapping *oauth2.CustomURLMapping
Name string
DisplayName string
Image string
CustomURLMapping *oauth2.CustomURLMapping
}

// OAuth2Providers contains the map of registered OAuth2 providers in Gitea (based on goth)
Expand Down Expand Up @@ -47,7 +48,7 @@ var OAuth2Providers = map[string]OAuth2Provider{
// OAuth2DefaultCustomURLMappings contains the map of default URL's for OAuth2 providers that are allowed to have custom urls
// key is used to map the OAuth2Provider
// value is the mapping as defined for the OAuth2Provider
var OAuth2DefaultCustomURLMappings = map[string]*oauth2.CustomURLMapping {
var OAuth2DefaultCustomURLMappings = map[string]*oauth2.CustomURLMapping{
"github": OAuth2Providers["github"].CustomURLMapping,
"gitlab": OAuth2Providers["gitlab"].CustomURLMapping,
}
Expand Down Expand Up @@ -119,4 +120,3 @@ func wrapOpenIDConnectInitializeError(err error, providerName string, oAuth2Conf
}
return err
}

2 changes: 1 addition & 1 deletion routers/api/v1/misc/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ func Version(ctx *context.APIContext) {
//
// Responses:
// 200: ServerVersion

ctx.JSON(200, &gitea.ServerVersion{Version: setting.AppVer})
}