findExe looks for an executable command on a set of paths. If it cannot find it, returns cmd.
(cmd string, paths []string)
| 245 | // findExe looks for an executable command on a set of paths. |
| 246 | // If it cannot find it, returns cmd. |
| 247 | func findExe(cmd string, paths []string) (string, bool) { |
| 248 | for _, p := range paths { |
| 249 | cp := filepath.Join(p, cmd) |
| 250 | if c, err := exec.LookPath(cp); err == nil { |
| 251 | return c, true |
| 252 | } |
| 253 | } |
| 254 | return cmd, false |
| 255 | } |
| 256 | |
| 257 | // Disasm returns the assembly instructions for the specified address range |
| 258 | // of a binary. |
no outgoing calls
no test coverage detected
searching dependent graphs…