Don't display any GORM related package path as source

This commit is contained in:
Jinzhu 2022-10-13 15:57:10 +08:00
parent 08aa2f9888
commit aa4312ee74
1 changed files with 1 additions and 1 deletions

View File

@ -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