Merge pull request #6952 from huydx/format-gofmt

(format) run go fmt in pkg
This commit is contained in:
Carl Bergquist
2016-12-14 09:26:38 +01:00
committed by GitHub
12 changed files with 78 additions and 79 deletions

View File

@@ -56,7 +56,7 @@ func OAuthLogin(ctx *middleware.Context) {
if setting.OAuthService.OAuthInfos[name].HostedDomain == "" {
ctx.Redirect(connect.AuthCodeURL(state, oauth2.AccessTypeOnline))
} else {
ctx.Redirect(connect.AuthCodeURL(state, oauth2.SetParam("hd", setting.OAuthService.OAuthInfos[name].HostedDomain), oauth2.AccessTypeOnline));
ctx.Redirect(connect.AuthCodeURL(state, oauth2.SetParam("hd", setting.OAuthService.OAuthInfos[name].HostedDomain), oauth2.AccessTypeOnline))
}
return
}

View File

@@ -23,7 +23,6 @@ import (
_ "github.com/mattn/go-sqlite3"
)
type DatabaseConfig struct {
Type, Host, Name, User, Pwd, Path, SslMode string
CaCertPath string

View File

@@ -186,7 +186,7 @@ func (s *GenericOAuth) UserInfo(client *http.Client) (*BasicUserInfo, error) {
Email: data.Email,
}
if (userInfo.Email == "" && data.Attributes["email:primary"] != nil) {
if userInfo.Email == "" && data.Attributes["email:primary"] != nil {
userInfo.Email = data.Attributes["email:primary"][0]
}
@@ -197,11 +197,11 @@ func (s *GenericOAuth) UserInfo(client *http.Client) (*BasicUserInfo, error) {
}
}
if (userInfo.Login == "" && data.Username != "") {
if userInfo.Login == "" && data.Username != "" {
userInfo.Login = data.Username
}
if (userInfo.Login == "") {
if userInfo.Login == "" {
userInfo.Login = data.Email
}

View File

@@ -3,9 +3,9 @@ package opentsdb
import (
"testing"
"github.com/grafana/grafana/pkg/components/simplejson"
"github.com/grafana/grafana/pkg/tsdb"
. "github.com/smartystreets/goconvey/convey"
"github.com/grafana/grafana/pkg/components/simplejson"
)
func TestOpenTsdbExecutor(t *testing.T) {