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
18 lines
309 B
package mysql
|
|
|
|
import (
|
|
"database/sql"
|
|
"git.aiterp.net/lucifer/new-server/internal/lerrors"
|
|
"log"
|
|
)
|
|
|
|
func dbErr(err error) error {
|
|
if err == sql.ErrNoRows {
|
|
return lerrors.ErrNotFound
|
|
} else if err != nil {
|
|
log.Printf("Internal error: %s", err.Error())
|
|
return lerrors.ErrInternal
|
|
}
|
|
|
|
return nil
|
|
}
|