diff options
author | skyblue <ssx205@gmail.com> | 2014-04-09 00:31:09 +0800 |
---|---|---|
committer | skyblue <ssx205@gmail.com> | 2014-04-09 00:31:09 +0800 |
commit | 24d0ca4aa02bd4245cd4c91f71b918c5da1d2e7d (patch) | |
tree | f0cd796a0ca0ceb6a5d37204a1711d527384d35d /models/oauth2.go | |
parent | d4565483e67dfd17f723114d5849b2ce6895c077 (diff) | |
download | gitea-24d0ca4aa02bd4245cd4c91f71b918c5da1d2e7d.tar.gz gitea-24d0ca4aa02bd4245cd4c91f71b918c5da1d2e7d.zip |
clean tail
Diffstat (limited to 'models/oauth2.go')
-rw-r--r-- | models/oauth2.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/models/oauth2.go b/models/oauth2.go index 10771d6a73..4da9800670 100644 --- a/models/oauth2.go +++ b/models/oauth2.go @@ -1,9 +1,6 @@ package models -import ( - "errors" - "fmt" -) +import "errors" // OT: Oauth2 Type const ( @@ -41,8 +38,7 @@ func GetOauth2(identity string) (oa *Oauth2, err error) { return } if !exists { - err = fmt.Errorf("not exists oauth2: %s", identity) - return + return nil, ErrOauth2RecordNotExists } if oa.Uid == 0 { return oa, ErrOauth2NotAssociatedWithUser |