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

Function commandConstructorCall

lint/constructor_command_exec.go:56–61  ·  view source on GitHub ↗
(p *cop.Pass, call *ast.CallExpr)

Source from the content-addressed store, hash-verified

54}
55
56func commandConstructorCall(p *cop.Pass, call *ast.CallExpr) (string, bool) {
57 if name, ok := osExecFuncName(calleeObject(p.Info, call)); ok {
58 return name, true
59 }
60 return cop.CallTo(call, "exec", "Command", "CommandContext")
61}
62
63// calleeObject resolves the object a call's callee denotes, whether the callee
64// is a bare identifier (f()) or a selector (pkg.F() / recv.F()). Returns nil

Callers 1

Calls 2

osExecFuncNameFunction · 0.85
calleeObjectFunction · 0.85

Tested by

no test coverage detected