remove debug print and utils_filenum_test.go
This commit is contained in:
parent
b2742c2b18
commit
c68613a592
@ -24,8 +24,6 @@ func init() {
|
|||||||
func FileWithLineNum() string {
|
func FileWithLineNum() string {
|
||||||
for i := 1; i < 15; i++ {
|
for i := 1; i < 15; i++ {
|
||||||
_, file, line, ok := runtime.Caller(i)
|
_, file, line, ok := runtime.Caller(i)
|
||||||
|
|
||||||
// fmt.Println("file:", file, " line: ", line, "ok: ", ok)
|
|
||||||
if ok && (!strings.HasPrefix(file, gormSourceDir) || strings.HasSuffix(file, "_test.go")) {
|
if ok && (!strings.HasPrefix(file, gormSourceDir) || strings.HasSuffix(file, "_test.go")) {
|
||||||
return file + ":" + strconv.FormatInt(int64(line), 10)
|
return file + ":" + strconv.FormatInt(int64(line), 10)
|
||||||
}
|
}
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
package gorm
|
|
||||||
|
|
||||||
import (
|
|
||||||
"log"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"gorm.io/gorm/utils"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestFileWithLineNum(t *testing.T) {
|
|
||||||
log.Println("FileWithLineNum: ", utils.FileWithLineNum())
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user