1
0
mirror of https://github.com/xorcare/testing-go-code-with-postgres.git synced 2025-06-30 23:23:40 +02:00

Enable linter 'wsl'

This is a highly controversial linter, but it generally has a positive
effect on code readability.
This commit is contained in:
Vasiliy Vasilyuk
2024-06-30 22:32:02 +03:00
parent 4544829f9b
commit ca16e02007
4 changed files with 12 additions and 0 deletions

View File

@ -26,9 +26,11 @@ func (r *UserRepository) ReadUser(ctx context.Context, userID uuid.UUID) (User,
user := User{}
row := r.db.QueryRow(ctx, sql, userID)
err := row.Scan(&user.ID, &user.Username, &user.CreatedAt)
if err != nil {
const format = "failed selection of User from database: %v"
return User{}, fmt.Errorf(format, err)
}