(obj types.Object)
| 78 | } |
| 79 | |
| 80 | func 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 | |
| 92 | func commandExecutionMethodCall(call *ast.CallExpr) (string, bool) { |
| 93 | sel, ok := call.Fun.(*ast.SelectorExpr) |
no test coverage detected