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

Method FindByUsername

internal/repository/user.go:114–121  ·  view source on GitHub ↗

FindByUsername 通过用户名查询用户

(ctx context.Context, username string)

Source from the content-addressed store, hash-verified

112
113// FindByUsername 通过用户名查询用户
114func (ur *userRepository) FindByUsername(ctx context.Context, username string) (domain.User, error) {
115 u, err := ur.dao.FindByUsername(ctx, username)
116 if err != nil {
117 return domain.User{}, err
118 }
119
120 return toDomainUser(u), nil
121}
122
123// DeleteUser 删除用户
124func (ur *userRepository) DeleteUser(ctx context.Context, username string, uid int64) error {

Callers

nothing calls this directly

Calls 2

toDomainUserFunction · 0.85
FindByUsernameMethod · 0.65

Tested by

no test coverage detected