1
This commit is contained in:
parent
85cacf770e
commit
77dfc7f2c7
@ -2,8 +2,8 @@ package f5
|
||||
|
||||
import (
|
||||
"os"
|
||||
//"strings"
|
||||
//"q5"
|
||||
"errors"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -32,6 +32,10 @@ func New[T any](cb func(*T)) *T {
|
||||
return obj
|
||||
}
|
||||
|
||||
func IsOrmErrRecordNotFound(err error) bool {
|
||||
return errors.Is(err, gorm.ErrRecordNotFound)
|
||||
}
|
||||
|
||||
func init() {
|
||||
switch os.Getenv("SERVER_ENV") {
|
||||
case "TEST":
|
||||
|
Loading…
x
Reference in New Issue
Block a user