Browse Source

fix err shadowing

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/196/head
Michael Telatynski 7 years ago
parent
commit
58d6be0184
No known key found for this signature in database GPG Key ID: 3F879DA5AD802A5E
  1. 4
      src/github.com/matrix-org/go-neb/services/github/github.go

4
src/github.com/matrix-org/go-neb/services/github/github.go

@ -61,8 +61,8 @@ type Service struct {
func (s *Service) requireGithubClientFor(userID string) (cli *gogithub.Client, resp interface{}, err error) {
cli = s.githubClientFor(userID, false)
if cli == nil {
r, err := database.GetServiceDB().LoadAuthRealm(s.RealmID)
if err != nil {
var r types.AuthRealm
if r, err = database.GetServiceDB().LoadAuthRealm(s.RealmID); err != nil {
return
}
if ghRealm, ok := r.(*github.Realm); ok {

Loading…
Cancel
Save