MCPcopy Index your code
hub / github.com/docker/docker-agent / calleeObject

Function calleeObject

lint/constructor_command_exec.go:66–78  ·  view source on GitHub ↗

calleeObject resolves the object a call's callee denotes, whether the callee is a bare identifier (f()) or a selector (pkg.F() / recv.F()). Returns nil when info is unavailable or the callee has no resolvable object.

(info *types.Info, call *ast.CallExpr)

Source from the content-addressed store, hash-verified

64// is a bare identifier (f()) or a selector (pkg.F() / recv.F()). Returns nil
65// when info is unavailable or the callee has no resolvable object.
66func calleeObject(info *types.Info, call *ast.CallExpr) types.Object {
67 if info == nil {
68 return nil
69 }
70 switch fun := call.Fun.(type) {
71 case *ast.SelectorExpr:
72 return info.Uses[fun.Sel]
73 case *ast.Ident:
74 return info.Uses[fun]
75 default:
76 return nil
77 }
78}
79
80func osExecFuncName(obj types.Object) (string, bool) {
81 fn, ok := obj.(*types.Func)

Callers 2

networkIOCallFunction · 0.85
commandConstructorCallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected