2 minute read

Switching from sqlx to db.v3 Short post – ended up switching from sqlx to db.v3 since I felt that the sqlx layer was more likely to be error prone. db.v3 example func (u *UserService) UpdateUser(user *model.User, args struct { Name *string Email *string Password *string }) (*model.User, error) { update := make(map[string]interface{}) if args.Password != nil { user.HashPassword(*args.Password) update["password"] = user.Password } if args.Name != nil && *args.Name != user.