Skip to content

Commit

Permalink
fix: NewText return
Browse files Browse the repository at this point in the history
  • Loading branch information
chelodoz committed May 20, 2024
1 parent b31ae51 commit 80835fa
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,5 @@ func (r *UserRepository) ListUsers(ctx context.Context) ([]model.User, error) {
}

func NewText(s string) pgtype.Text {
if s == "" {
return pgtype.Text{}
}
return pgtype.Text{
String: s,
Valid: true,
}
return pgtype.Text{String: s, Valid: s != ""}
}

0 comments on commit 80835fa

Please sign in to comment.