fix: remove unused file information from caller logging function

This commit is contained in:
2026-01-10 17:32:55 +08:00
parent 346d56b375
commit 90b79abec4

View File

@@ -7,7 +7,7 @@ import (
// Fnc prints the caller function name, file and line number.
func Fnc() {
pc, file, line, ok := runtime.Caller(1)
pc, _, line, ok := runtime.Caller(1)
if !ok {
fmt.Println("unable to get caller")
return
@@ -17,5 +17,5 @@ func Fnc() {
if fn != nil {
name = fn.Name()
}
fmt.Printf("%s %s:%d <----\n", name, file, line)
fmt.Printf("%s:%d <----\n", name, line)
}