From aa4312ee74db5a23d459d487b43a4a79d341c936 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Thu, 13 Oct 2022 15:57:10 +0800 Subject: [PATCH] Don't display any GORM related package path as source --- utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.go b/utils/utils.go index 296917b9..90b4c8ea 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -16,7 +16,7 @@ var gormSourceDir string func init() { _, file, _, _ := runtime.Caller(0) // compatible solution to get gorm source directory with various operating systems - gormSourceDir = regexp.MustCompile(`utils.utils\.go`).ReplaceAllString(file, "") + gormSourceDir = regexp.MustCompile(`gorm.utils.utils\.go`).ReplaceAllString(file, "") } // FileWithLineNum return the file name and line number of the current file