forked from mirror/gorm
Don't display any GORM related package path as source
This commit is contained in:
parent
08aa2f9888
commit
aa4312ee74
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue