chore: refresh gramsrv public release
This commit is contained in:
parent
75cebe8dbf
commit
70b6820474
1274 changed files with 378751 additions and 59919 deletions
22
internal/store/postgres/trace.go
Normal file
22
internal/store/postgres/trace.go
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package postgres
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func traceCaller(skip int) string {
|
||||
pc, file, line, ok := runtime.Caller(skip)
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
name := ""
|
||||
if fn := runtime.FuncForPC(pc); fn != nil {
|
||||
name = fn.Name()
|
||||
}
|
||||
if name == "" {
|
||||
return fmt.Sprintf("%s:%d", filepath.ToSlash(file), line)
|
||||
}
|
||||
return fmt.Sprintf("%s %s:%d", name, filepath.ToSlash(file), line)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue