func Callee(info *types.Info, call *ast.CallExpr) types.Object {
	var obj types.Object
	switch fun := astutil.Unparen(call.Fun).(type) {
	case *ast.Ident:
		obj = info.Uses[fun]  
	case *ast.SelectorExpr:
		if sel, ok := info.Selections[fun]; ok {
			obj = sel.Obj()  
		} else {
			obj = info.Uses[fun.Sel]  
		}
	}
	if _, ok := obj.(*types.TypeName); ok {
		return nil  
	}
	return obj
}
Callee returns the named target of a function call, if any:
a function, method, builtin, or variable.
package typeutil
import (
	"go/ast"
	"go/types"
	"golang.org/x/tools/go/ast/astutil"
)