Skip to content

Commit

Permalink
File does not have line number yet
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Jul 7, 2022
1 parent 571ba4b commit 7dd6bbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ func fileWithLineNum() string {
for i := 2; i < 15; i++ {
_, file, line, ok := runtime.Caller(i)
if ok && (!strings.HasSuffix(file, "_test.go") &&
!strings.Contains(file, "gorm.go:") &&
!strings.Contains(file, "callbacks.go:") &&
!strings.Contains(file, "finisher_api.go:")) {
!strings.Contains(file, "gorm.go") &&
!strings.Contains(file, "callbacks.go") &&
!strings.Contains(file, "finisher_api.go")) {
return file + ":" + strconv.FormatInt(int64(line), 10)
}
}
Expand Down

0 comments on commit 7dd6bbe

Please sign in to comment.