MCPcopy
hub / github.com/docker/docker-agent / osExecFuncName

Function osExecFuncName

lint/constructor_command_exec.go:80–90  ·  view source on GitHub ↗
(obj types.Object)

Source from the content-addressed store, hash-verified

78}
79
80func osExecFuncName(obj types.Object) (string, bool) {
81 fn, ok := obj.(*types.Func)
82 if !ok {
83 return "", false
84 }
85 pkg := fn.Pkg()
86 if pkg != nil && pkg.Path() == "os/exec" && (fn.Name() == "Command" || fn.Name() == "CommandContext") {
87 return fn.Name(), true
88 }
89 return "", false
90}
91
92func commandExecutionMethodCall(call *ast.CallExpr) (string, bool) {
93 sel, ok := call.Fun.(*ast.SelectorExpr)

Callers 1

commandConstructorCallFunction · 0.85

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected