From 24d0ca4aa02bd4245cd4c91f71b918c5da1d2e7d Mon Sep 17 00:00:00 2001 From: skyblue Date: Wed, 9 Apr 2014 00:31:09 +0800 Subject: clean tail --- models/oauth2.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'models/oauth2.go') 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 -- cgit v1.2.3