package utils //nolint:revive

import (
	"fmt"
	"runtime"
)

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