MCPcopy
hub / github.com/go-gorm/gorm / FileWithLineNum

Function FileWithLineNum

utils/utils.go:62–70  ·  view source on GitHub ↗

FileWithLineNum return the file name and line number of the current file

()

Source from the content-addressed store, hash-verified

60
61// FileWithLineNum return the file name and line number of the current file
62func FileWithLineNum() string {
63 // Keep FileWithLineNum one frame outer than CallerFrame to preserve pre-v1.31.1 semantics.
64 frame := callerFrame(4)
65 if frame.PC != 0 {
66 return string(strconv.AppendInt(append([]byte(frame.File), ':'), int64(frame.Line), 10))
67 }
68
69 return ""
70}
71
72func IsInvalidDBNameChar(c rune) bool {
73 return !unicode.IsLetter(c) && !unicode.IsNumber(c) && c != '.' && c != '*' && c != '_' && c != '$' && c != '@'

Callers 11

RemoveMethod · 0.92
ReplaceMethod · 0.92
sortCallbacksFunction · 0.92
AssertObjEqualFunction · 0.92
AssertEqualFunction · 0.92
InfoMethod · 0.92
WarnMethod · 0.92
ErrorMethod · 0.92
TraceMethod · 0.92

Calls 1

callerFrameFunction · 0.85