MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / FindByPhone

Method FindByPhone

internal/repository/user.go:104–111  ·  view source on GitHub ↗

FindByPhone 通过电话查询用户

(ctx context.Context, phone string)

Source from the content-addressed store, hash-verified

102
103// FindByPhone 通过电话查询用户
104func (ur *userRepository) FindByPhone(ctx context.Context, phone string) (domain.User, error) {
105 u, err := ur.dao.FindByPhone(ctx, phone)
106 if err != nil {
107 return domain.User{}, err
108 }
109
110 return toDomainUser(u), nil
111}
112
113// FindByUsername 通过用户名查询用户
114func (ur *userRepository) FindByUsername(ctx context.Context, username string) (domain.User, error) {

Callers

nothing calls this directly

Calls 2

toDomainUserFunction · 0.85
FindByPhoneMethod · 0.65

Tested by

no test coverage detected