Less naked returns (#25713)
just a step towards #25655 and some related refactoring
This commit is contained in:
parent
b1eb1676aa
commit
8995046110
32 changed files with 254 additions and 239 deletions
|
@ -306,9 +306,10 @@ func (code *OAuth2AuthorizationCode) TableName() string {
|
|||
}
|
||||
|
||||
// GenerateRedirectURI generates a redirect URI for a successful authorization request. State will be used if not empty.
|
||||
func (code *OAuth2AuthorizationCode) GenerateRedirectURI(state string) (redirect *url.URL, err error) {
|
||||
if redirect, err = url.Parse(code.RedirectURI); err != nil {
|
||||
return
|
||||
func (code *OAuth2AuthorizationCode) GenerateRedirectURI(state string) (*url.URL, error) {
|
||||
redirect, err := url.Parse(code.RedirectURI)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
q := redirect.Query()
|
||||
if state != "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue