Skip to content

Commit a79f69d

Browse files
committed
fix: error returned
1 parent 03af207 commit a79f69d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/google/google.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ var (
3535
// ErrUserIDNil is returned when the user ID is nil.
3636
ErrUserIDNil = fmt.Errorf("google: user id is required")
3737

38+
// ErrUserEmailNil is returned when the user email is nil.
39+
ErrUserEmailNil = fmt.Errorf("google: user email is required")
40+
3841
// ErrGroupIDNil is returned when the group ID is nil.
3942
ErrGroupIDNil = fmt.Errorf("google: group id is required")
4043

@@ -74,7 +77,7 @@ func NewService(ctx context.Context, config DirectoryServiceConfig) (*admin.Serv
7477
}
7578

7679
if config.UserEmail == "" {
77-
return nil, ErrUserIDNil
80+
return nil, ErrUserEmailNil
7881
}
7982

8083
if config.ServiceAccount == nil {

0 commit comments

Comments
 (0)