fix: remove unused file information from caller logging function
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user