You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
309 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. package mysql
  2. import (
  3. "database/sql"
  4. "git.aiterp.net/lucifer/new-server/internal/lerrors"
  5. "log"
  6. )
  7. func dbErr(err error) error {
  8. if err == sql.ErrNoRows {
  9. return lerrors.ErrNotFound
  10. } else if err != nil {
  11. log.Printf("Internal error: %s", err.Error())
  12. return lerrors.ErrInternal
  13. }
  14. return nil
  15. }