Skip to content

Commit

Permalink
Errorf instead of sprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
willvedd committed Sep 19, 2023
1 parent 3f89c76 commit 82c3979
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/auth/authutil/user_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package authutil

import (
"encoding/json"
"errors"
"fmt"
"net/http"
"net/url"
Expand Down Expand Up @@ -61,7 +60,7 @@ func (u *UserInfo) UnmarshalJSON(b []byte) error {
return err
}
default:
return errors.New(fmt.Sprintf("unable to unmarshal JSON for email_verified field. Expected bool or string, got: %s", reflect.TypeOf(rawEmailVerified)))
return fmt.Errorf("unable to unmarshal JSON for email_verified field. Expected bool or string, got: %s", reflect.TypeOf(rawEmailVerified))
}
alias.EmailVerified = &emailVerified
}
Expand Down

0 comments on commit 82c3979

Please sign in to comment.