From 8da7325683120826e89e7e02a9c1643cdc21f44f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=93=81=E5=93=A5?= Date: Wed, 26 Aug 2015 00:11:24 +0800 Subject: [PATCH] Update github.go --- providers/github.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/providers/github.go b/providers/github.go index c9b490f..db0b21a 100644 --- a/providers/github.go +++ b/providers/github.go @@ -17,21 +17,21 @@ type GitHubProvider struct { func NewGitHubProvider(p *ProviderData) *GitHubProvider { p.ProviderName = "GitHub" - if p.LoginUrl.String() == "" { + if p.LoginUrl == nil || p.LoginUrl.String() == "" { p.LoginUrl = &url.URL{ Scheme: "https", Host: "github.com", Path: "/login/oauth/authorize", } } - if p.RedeemUrl.String() == "" { + if p.RedeemUrl == nil || p.RedeemUrl.String() == "" { p.RedeemUrl = &url.URL{ Scheme: "https", Host: "github.com", Path: "/login/oauth/access_token", } } - if p.ValidateUrl.String() == "" { + if p.ValidateUrl == nil || p.ValidateUrl.String() == "" { p.ValidateUrl = &url.URL{ Scheme: "https", Host: "api.github.com",