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.
|
// Fnc prints the caller function name, file and line number.
|
||||||
func Fnc() {
|
func Fnc() {
|
||||||
pc, file, line, ok := runtime.Caller(1)
|
pc, _, line, ok := runtime.Caller(1)
|
||||||
if !ok {
|
if !ok {
|
||||||
fmt.Println("unable to get caller")
|
fmt.Println("unable to get caller")
|
||||||
return
|
return
|
||||||
@@ -17,5 +17,5 @@ func Fnc() {
|
|||||||
if fn != nil {
|
if fn != nil {
|
||||||
name = fn.Name()
|
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